From e936ba0f5ad0b8d1b6ef45fb40e63c7a874a287e Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Fri, 5 Sep 2008 19:53:30 +0000 Subject: [PATCH] stop the emission of the signal also when we bail out early because we 2008-09-05 Michael Natterer * gtk/gtkfilechooserdefault.c (file_list_drag_data_received_cb): stop the emission of the signal also when we bail out early because we don't accept drops from ourselves. Keeps the code from running into a warning in gtktreeview.c. svn path=/trunk/; revision=21302 --- ChangeLog | 7 +++++++ gtk/gtkfilechooserdefault.c | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff0585fbe9..a693df95db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-05 Michael Natterer + + * gtk/gtkfilechooserdefault.c (file_list_drag_data_received_cb): + stop the emission of the signal also when we bail out early + because we don't accept drops from ourselves. Keeps the code from + running into a warning in gtktreeview.c. + 2008-09-05 Tor Lillqvist * gtk-zip.sh.in: Fetch manpages from share/man where they get diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 71eadcf7a3..5f5b849d02 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -4197,10 +4197,13 @@ file_list_drag_data_received_cb (GtkWidget *widget, impl = GTK_FILE_CHOOSER_DEFAULT (data); chooser = GTK_FILE_CHOOSER (data); - + /* Allow only drags from other widgets; see bug #533891. */ if (gtk_drag_get_source_widget (context) == widget) - return; + { + g_signal_stop_emission_by_name (widget, "drag-data-received"); + return; + } /* Parse the text/uri-list string, navigate to the first one */ uris = gtk_selection_data_get_uris (selection_data);