[eog] Enable more Drag&Drop actions when eog is drag source



commit bcf7817737f0412e6a6de2686ec64b31dd470dca
Author: Felix Riemann <friemann gnome org>
Date:   Wed Jan 4 15:39:26 2012 +0100

    Enable more Drag&Drop actions when eog is drag source
    
    Enable the link and ask actions allowing to create symlinks in Nautilus
    or triggering a menu asking what to do. Also enable the move action,
    which was not specifically enabled before but still worked anyway.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=667076

 src/eog-scroll-view.c |    3 ++-
 src/eog-thumb-view.c  |    5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c
index 313891f..c3e9e8e 100644
--- a/src/eog-scroll-view.c
+++ b/src/eog-scroll-view.c
@@ -2512,7 +2512,8 @@ eog_scroll_view_init (EogScrollView *view)
 
 	gtk_drag_source_set (priv->display, GDK_BUTTON1_MASK,
 			     target_table, G_N_ELEMENTS (target_table),
-			     GDK_ACTION_COPY);
+			     GDK_ACTION_COPY | GDK_ACTION_MOVE |
+			     GDK_ACTION_LINK | GDK_ACTION_ASK);
 	g_signal_connect (G_OBJECT (priv->display), "drag-data-get",
 			  G_CALLBACK (view_on_drag_data_get_cb), view);
 	g_signal_connect (G_OBJECT (priv->display), "drag-begin",
diff --git a/src/eog-thumb-view.c b/src/eog-thumb-view.c
index b2dcb12..9c1eb86 100644
--- a/src/eog-thumb-view.c
+++ b/src/eog-thumb-view.c
@@ -133,7 +133,10 @@ eog_thumb_view_constructed (GObject *object)
 
 	gtk_icon_view_enable_model_drag_source (GTK_ICON_VIEW (thumbview), 0,
 						NULL, 0,
-						GDK_ACTION_COPY);
+						GDK_ACTION_COPY |
+						GDK_ACTION_MOVE |
+						GDK_ACTION_LINK |
+						GDK_ACTION_ASK);
 	gtk_drag_source_add_uri_targets (GTK_WIDGET (thumbview));
 
 	g_signal_connect (G_OBJECT (thumbview), "drag-data-get",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]