[evince] [shell] Abort dnd operations originated in the same Evince window
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: svn-commits-list gnome org
- Subject: [evince] [shell] Abort dnd operations originated in the same Evince window
- Date: Wed, 13 May 2009 08:53:31 -0400 (EDT)
commit 5aca30a9831db84b4485fe6a5c8de5357c940d5d
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Wed May 13 14:47:33 2009 +0200
[shell] Abort dnd operations originated in the same Evince window
Fixes bug #582077
---
shell/ev-window.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 16e10ca..7ec9aca 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -4519,10 +4519,17 @@ ev_window_drag_data_received (GtkWidget *widget,
guint time)
{
- EvWindow *window = EV_WINDOW (widget);
- gchar **uris;
- gint i = 0;
- GSList *uri_list = NULL;
+ EvWindow *window = EV_WINDOW (widget);
+ gchar **uris;
+ gint i = 0;
+ GSList *uri_list = NULL;
+ GtkWidget *source;
+
+ source = gtk_drag_get_source_widget (context);
+ if (source && widget == gtk_widget_get_toplevel (source)) {
+ gtk_drag_finish (context, FALSE, FALSE, time);
+ return;
+ }
uris = gtk_selection_data_get_uris (selection_data);
if (!uris) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]