made dropping a color on the index panel work (it doesn't save the

made dropping a color on the index panel work (it doesn't save the
       metadata yet, though)
This commit is contained in:
Andy Hertzfeld 2000-01-10 03:36:30 +00:00
parent ee76fdd9b2
commit 1cfc709b61
4 changed files with 87 additions and 6 deletions

View file

@ -1,3 +1,9 @@
2000-01-09 Andy Hertzfeld <andy@eazel.com>
* src/ntl-index-panel.c"
made dropping a color from the color picker set the background accordingly. It doesn't
save the meta-data yet, thought
2000-01-09 Maciej Stachowiak <mjs@eazel.com>
* components/websearch/.cvsignore: Added .deps, .libs,

View file

@ -160,8 +160,33 @@ nautilus_index_panel_new (void)
static void
nautilus_index_panel_drag_data_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time)
{
/* FIXME: set up the new color here */
printf("something dropped on index panel: %d\n", info);
gchar temp_str[512];
guint16 *data = (guint16 *)selection_data->data;
switch (info)
{
case TARGET_URI_LIST:
printf("dropped data on index panel: %s", selection_data->data);
/* handle background images and keywords soon */
/* handle images dropped on the logo specially */
/* handle files by setting the location to the file */
break;
/* handle colors - for now, just use a simple color, and don't save it in the meta-data yet */
case TARGET_COLOR:
g_snprintf(temp_str, sizeof(temp_str), "rgb:%2x/%2x/%2x", data[0], data[1], data[2]);
nautilus_index_panel_set_up_background(widget, temp_str);
break;
default:
printf("unknown drop type: %d\n", info);
break;
}
}
/* add a new meta-view to the index panel */

View file

@ -160,8 +160,33 @@ nautilus_index_panel_new (void)
static void
nautilus_index_panel_drag_data_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time)
{
/* FIXME: set up the new color here */
printf("something dropped on index panel: %d\n", info);
gchar temp_str[512];
guint16 *data = (guint16 *)selection_data->data;
switch (info)
{
case TARGET_URI_LIST:
printf("dropped data on index panel: %s", selection_data->data);
/* handle background images and keywords soon */
/* handle images dropped on the logo specially */
/* handle files by setting the location to the file */
break;
/* handle colors - for now, just use a simple color, and don't save it in the meta-data yet */
case TARGET_COLOR:
g_snprintf(temp_str, sizeof(temp_str), "rgb:%2x/%2x/%2x", data[0], data[1], data[2]);
nautilus_index_panel_set_up_background(widget, temp_str);
break;
default:
printf("unknown drop type: %d\n", info);
break;
}
}
/* add a new meta-view to the index panel */

View file

@ -160,8 +160,33 @@ nautilus_index_panel_new (void)
static void
nautilus_index_panel_drag_data_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time)
{
/* FIXME: set up the new color here */
printf("something dropped on index panel: %d\n", info);
gchar temp_str[512];
guint16 *data = (guint16 *)selection_data->data;
switch (info)
{
case TARGET_URI_LIST:
printf("dropped data on index panel: %s", selection_data->data);
/* handle background images and keywords soon */
/* handle images dropped on the logo specially */
/* handle files by setting the location to the file */
break;
/* handle colors - for now, just use a simple color, and don't save it in the meta-data yet */
case TARGET_COLOR:
g_snprintf(temp_str, sizeof(temp_str), "rgb:%2x/%2x/%2x", data[0], data[1], data[2]);
nautilus_index_panel_set_up_background(widget, temp_str);
break;
default:
printf("unknown drop type: %d\n", info);
break;
}
}
/* add a new meta-view to the index panel */