Skip to content

Commit

Permalink
Enable more Drag&Drop actions when eom is drag source
Browse files Browse the repository at this point in the history
Enable the link and ask actions allowing to create symlinks in Caja
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

origin commit:
https://gitlab.gnome.org/GNOME/eog/commit/bcf7817
  • Loading branch information
fxri authored and raveit65 committed Jul 3, 2018
1 parent fb4446d commit ed3ef44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/eom-scroll-view.c
Expand Up @@ -1800,7 +1800,8 @@ eom_scroll_view_init (EomScrollView *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",
Expand Down
5 changes: 4 additions & 1 deletion src/eom-thumb-view.c
Expand Up @@ -149,7 +149,10 @@ eom_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",
Expand Down

0 comments on commit ed3ef44

Please sign in to comment.