1 Description: When using Drag'n'Drop from Places menu, install a link launcher (.desktop file) instead of copying the entire directory.
2 Author: Marcel Stimberg
3 Bug: https://bugzilla.gnome.org/show_bug.cgi?id=357934
4 Bug-Ubuntu: https://launchpad.net/bugs/62529
6 Index: gnome-panel-2.30.0/gnome-panel/menu.c
7 ===================================================================
8 --- gnome-panel-2.30.0.orig/gnome-panel/menu.c 2010-03-09 00:07:06.000000000 +1100
9 +++ gnome-panel-2.30.0/gnome-panel/menu.c 2010-06-03 13:57:54.293946027 +1000
12 setup_uri_drag (GtkWidget *menuitem,
16 + GdkDragAction action)
18 static GtkTargetEntry menu_item_targets[] = {
19 { "text/uri-list", 0, 0 }
21 gtk_drag_source_set (menuitem,
22 GDK_BUTTON1_MASK|GDK_BUTTON2_MASK,
28 gtk_drag_source_set_icon_name (menuitem, icon);
29 Index: gnome-panel-2.30.0/gnome-panel/menu.h
30 ===================================================================
31 --- gnome-panel-2.30.0.orig/gnome-panel/menu.h 2010-01-14 14:26:27.000000000 +1100
32 +++ gnome-panel-2.30.0/gnome-panel/menu.h 2010-06-03 13:57:54.293946027 +1000
34 PanelActionButtonType type);
35 void setup_uri_drag (GtkWidget *menuitem,
39 + GdkDragAction action);
41 GtkWidget * panel_create_menu (void);
43 Index: gnome-panel-2.30.0/gnome-panel/panel-menu-items.c
44 ===================================================================
45 --- gnome-panel-2.30.0.orig/gnome-panel/panel-menu-items.c 2010-06-03 13:57:49.626446947 +1000
46 +++ gnome-panel-2.30.0/gnome-panel/panel-menu-items.c 2010-06-03 13:57:54.293946027 +1000
49 uri = g_filename_to_uri (full_path, NULL, NULL);
51 - setup_uri_drag (item, uri, icon);
52 + setup_uri_drag (item, uri, icon, GDK_ACTION_COPY);
55 g_key_file_free (key_file);
57 g_signal_connect (G_OBJECT (item), "button_press_event",
58 G_CALLBACK (menu_dummy_button_press_event), NULL);
60 - setup_uri_drag (item, uri, icon_name);
61 + if (g_str_has_prefix (uri, "file:")) /*Links only work for local files*/
62 + setup_uri_drag (item, uri, icon_name, GDK_ACTION_LINK);