From e0971ba263ca725e48766ce4c51b8c36dd303be8 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Oct 30 2009 03:32:15 +0000 Subject: fix sticky DND --- diff --git a/file-roller.spec b/file-roller.spec index 65fae90..b4f0398 100644 --- a/file-roller.spec +++ b/file-roller.spec @@ -11,12 +11,15 @@ Summary: Tool for viewing and creating archives Name: file-roller Version: 2.28.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Archiving URL: http://download.gnome.org/sources/file-roller/ Source: http://download.gnome.org/sources/file-roller/2.28/file-roller-%{version}.tar.bz2 +# https://bugzilla.gnome.org/show_bug.cgi?id=590606 +Patch0: sticky-dnd.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: pango-devel >= %{pango_version} @@ -51,6 +54,7 @@ such as tar or zip files. %prep %setup -q +%patch0 -p1 -b .sticky-dnd %build %configure --disable-scrollkeeper --disable-static @@ -127,6 +131,9 @@ fi %{_datadir}/icons/hicolor/scalable/apps/file-roller.svg %changelog +* Thu Oct 29 2009 Matthias Clasen 2.28.1-2 +- Fix sticky DND + * Mon Oct 19 2009 Matthias Clasen 2.28.1-1 - Update to 2.28.1 diff --git a/sticky-dnd.patch b/sticky-dnd.patch new file mode 100644 index 0000000..75e0ec7 --- /dev/null +++ b/sticky-dnd.patch @@ -0,0 +1,53 @@ +--- file-roller-2.28.1/src/eggtreemultidnd.c 2009-10-19 13:53:45.000000000 -0400 ++++ hacked/src/eggtreemultidnd.c 2009-10-29 23:23:12.660790804 -0400 +@@ -179,8 +179,14 @@ + priv_data->event_list = NULL; + priv_data->pending_event = FALSE; + +- g_signal_handler_disconnect (widget, priv_data->motion_notify_handler); +- g_signal_handler_disconnect (widget, priv_data->button_release_handler); ++ if (priv_data->motion_notify_handler) { ++ g_signal_handler_disconnect (widget, priv_data->motion_notify_handler); ++ priv_data->motion_notify_handler = 0; ++ } ++ if (priv_data->button_release_handler) { ++ g_signal_handler_disconnect (widget, priv_data->button_release_handler); ++ priv_data->button_release_handler = 0; ++ } + } + + +@@ -401,16 +407,23 @@ + priv_data->event_list = g_slist_append (priv_data->event_list, + gdk_event_copy ((GdkEvent*)event)); + +- priv_data->motion_notify_handler = +- g_signal_connect (G_OBJECT (tree_view), +- "motion_notify_event", +- G_CALLBACK (egg_tree_multi_drag_motion_event), +- NULL); +- priv_data->button_release_handler = +- g_signal_connect (G_OBJECT (tree_view), +- "button_release_event", +- G_CALLBACK (egg_tree_multi_drag_button_release_event), +- NULL); ++ if (priv_data->motion_notify_handler == 0) ++ { ++ priv_data->motion_notify_handler = ++ g_signal_connect (G_OBJECT (tree_view), ++ "motion_notify_event", ++ G_CALLBACK (egg_tree_multi_drag_motion_event), ++ NULL); ++ } ++ ++ if (priv_data->button_release_handler == 0) ++ { ++ priv_data->button_release_handler = ++ g_signal_connect (G_OBJECT (tree_view), ++ "button_release_event", ++ G_CALLBACK (egg_tree_multi_drag_button_release_event), ++ NULL); ++ } + + if (priv_data->drag_data_get_handler == 0) + {