From 454639f9d9703a14a235973d81378afc53387862 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 9 Jan 2013 00:28:30 +0100 Subject: [PATCH] Bug 689087 - Drag-and-drop foo.jpg behaves different from 'gimp foo.jpg'... Prefer text/uri-list over image/* to make dropping from file managers always behave like opening the image directly. --- app/display/gimpdisplayshell-dnd.c | 12 ++++---- app/widgets/gimplayertreeview.c | 4 +-- app/widgets/gimptoolbox-dnd.c | 48 ++++++++++++++---------------- 3 files changed, 31 insertions(+), 33 deletions(-) diff --git a/app/display/gimpdisplayshell-dnd.c b/app/display/gimpdisplayshell-dnd.c index e401716210..52b6a38ae0 100644 --- a/app/display/gimpdisplayshell-dnd.c +++ b/app/display/gimpdisplayshell-dnd.c @@ -139,18 +139,18 @@ gimp_display_shell_dnd_init (GimpDisplayShell *shell) gimp_dnd_color_dest_add (shell->canvas, gimp_display_shell_drop_color, shell); - gimp_dnd_svg_dest_add (shell->canvas, - gimp_display_shell_drop_svg, - shell); gimp_dnd_component_dest_add (shell->canvas, gimp_display_shell_drop_component, shell); - gimp_dnd_pixbuf_dest_add (shell->canvas, - gimp_display_shell_drop_pixbuf, - shell); gimp_dnd_uri_list_dest_add (shell->canvas, gimp_display_shell_drop_uri_list, shell); + gimp_dnd_svg_dest_add (shell->canvas, + gimp_display_shell_drop_svg, + shell); + gimp_dnd_pixbuf_dest_add (shell->canvas, + gimp_display_shell_drop_pixbuf, + shell); } diff --git a/app/widgets/gimplayertreeview.c b/app/widgets/gimplayertreeview.c index 9ede0a3a1b..45ddcd5e91 100644 --- a/app/widgets/gimplayertreeview.c +++ b/app/widgets/gimplayertreeview.c @@ -368,10 +368,10 @@ gimp_layer_tree_view_constructed (GObject *object) NULL, tree_view); gimp_dnd_viewable_dest_add (GTK_WIDGET (tree_view->view), GIMP_TYPE_LAYER_MASK, NULL, tree_view); - gimp_dnd_pixbuf_dest_add (GTK_WIDGET (tree_view->view), - NULL, tree_view); gimp_dnd_uri_list_dest_add (GTK_WIDGET (tree_view->view), NULL, tree_view); + gimp_dnd_pixbuf_dest_add (GTK_WIDGET (tree_view->view), + NULL, tree_view); /* hide basically useless edit button */ gtk_widget_hide (gimp_item_tree_view_get_edit_button (GIMP_ITEM_TREE_VIEW (layer_view))); diff --git a/app/widgets/gimptoolbox-dnd.c b/app/widgets/gimptoolbox-dnd.c index 06563a4bb3..449294f408 100644 --- a/app/widgets/gimptoolbox-dnd.c +++ b/app/widgets/gimptoolbox-dnd.c @@ -103,37 +103,35 @@ gimp_toolbox_dnd_init (GimpToolbox *toolbox, 0, NULL, 0, GDK_ACTION_COPY | GDK_ACTION_MOVE); - gimp_dnd_viewable_dest_add (vbox, - GIMP_TYPE_LAYER, - gimp_toolbox_drop_drawable, - context); - gimp_dnd_viewable_dest_add (vbox, - GIMP_TYPE_LAYER_MASK, - gimp_toolbox_drop_drawable, - context); - gimp_dnd_viewable_dest_add (vbox, - GIMP_TYPE_CHANNEL, - gimp_toolbox_drop_drawable, - context); - gimp_dnd_viewable_dest_add (vbox, - GIMP_TYPE_TOOL_INFO, - gimp_toolbox_drop_tool, - context); - gimp_dnd_viewable_dest_add (vbox, - GIMP_TYPE_BUFFER, - gimp_toolbox_drop_buffer, - context); - + gimp_dnd_viewable_dest_add (vbox, + GIMP_TYPE_LAYER, + gimp_toolbox_drop_drawable, + context); + gimp_dnd_viewable_dest_add (vbox, + GIMP_TYPE_LAYER_MASK, + gimp_toolbox_drop_drawable, + context); + gimp_dnd_viewable_dest_add (vbox, + GIMP_TYPE_CHANNEL, + gimp_toolbox_drop_drawable, + context); + gimp_dnd_viewable_dest_add (vbox, + GIMP_TYPE_TOOL_INFO, + gimp_toolbox_drop_tool, + context); + gimp_dnd_viewable_dest_add (vbox, + GIMP_TYPE_BUFFER, + gimp_toolbox_drop_buffer, + context); gimp_dnd_component_dest_add (vbox, gimp_toolbox_drop_component, context); + gimp_dnd_uri_list_dest_add (vbox, + gimp_toolbox_drop_uri_list, + context); gimp_dnd_pixbuf_dest_add (vbox, gimp_toolbox_drop_pixbuf, context); - - gimp_dnd_uri_list_dest_add (vbox, - gimp_toolbox_drop_uri_list, - context); }