diff --git a/gnome/ChangeLog b/gnome/ChangeLog index f493efbe0..d021f72f6 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,3 +1,11 @@ +1999-01-07 Miguel de Icaza + + * gscreen.c (panel_icon_list_drag_data_received): Do not update + contents if nothing was done (ie, the drop was cancelled). + + * gdnd.c (gdnd_drop_on_directory): Do nothing if the files dragged + are on the same directory we are. + 1999-01-07 Jonathan Blandford * gcmd.c (gnome_filter_cmd): Function filled in now. Actually diff --git a/gnome/gdnd.c b/gnome/gdnd.c index 30364ed6c..24836d055 100644 --- a/gnome/gdnd.c +++ b/gnome/gdnd.c @@ -276,7 +276,12 @@ gdnd_drop_on_directory (GdkDragContext *context, GtkSelectionData *selection_dat /* If we are dragging from a file panel, we can display a nicer status display */ source_panel = find_panel_owning_window (context); - printf ("Panel found for this source: %p\n", source_panel); + /* Check if the user did not drag the information to the same directory */ + if (source_panel){ + if (strcmp (source_panel->cwd, destdir) == 0) + return FALSE; + } + /* Symlinks do not use file.c */ if (source_panel && action != GDK_ACTION_LINK) diff --git a/gnome/gscreen.c b/gnome/gscreen.c index d62121d82..234c9d53f 100644 --- a/gnome/gscreen.c +++ b/gnome/gscreen.c @@ -769,7 +769,8 @@ panel_icon_list_drag_data_received (GtkWidget *widget, GnomeIconList *gil = GNOME_ICON_LIST (widget); char *dir; int idx; - + gboolean reload; + idx = gnome_icon_list_get_icon_at (gil, x, y); if (idx == -1) dir = g_strdup (panel->cwd); @@ -781,11 +782,13 @@ panel_icon_list_drag_data_received (GtkWidget *widget, dir = g_strdup (panel->cwd); } - gdnd_drop_on_directory (context, selection_data, dir); + reload = gdnd_drop_on_directory (context, selection_data, dir); free (dir); - update_one_panel_widget (panel, 0, UP_KEEPSEL); - panel_update_contents (panel); + if (reload){ + update_one_panel_widget (panel, 0, UP_KEEPSEL); + panel_update_contents (panel); + } } /**