From 341e999cb9d91d661c24fd4bbc77b4479a160d96 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Dec 03 2009 10:27:59 +0000 Subject: - Fix Nautilus crash on drag and drop from file-roller (#513230) --- diff --git a/nautilus-2.28.2-dnd-crash.patch b/nautilus-2.28.2-dnd-crash.patch new file mode 100644 index 0000000..ceba0a9 --- /dev/null +++ b/nautilus-2.28.2-dnd-crash.patch @@ -0,0 +1,70 @@ +From d5be5ed688bfeb7a8514c2ae3659921f79cdd0eb Mon Sep 17 00:00:00 2001 +From: Cosimo Cecchi +Date: Mon, 02 Nov 2009 17:09:15 +0000 +Subject: Don't get drag data in list mode if we don't support the target. + +This fixes bug #600183. +(cherry picked from commit 6613262f4e6d40d153299d7fd4726210268a2a53) +--- +diff --git a/libnautilus-private/nautilus-tree-view-drag-dest.c b/libnautilus-private/nautilus-tree-view-drag-dest.c +index 09ce442..20646ef 100644 +--- a/libnautilus-private/nautilus-tree-view-drag-dest.c ++++ b/libnautilus-private/nautilus-tree-view-drag-dest.c +@@ -242,7 +242,7 @@ clear_drag_dest_row (NautilusTreeViewDragDest *dest) + set_widget_highlight (dest, FALSE); + } + +-static void ++static gboolean + get_drag_data (NautilusTreeViewDragDest *dest, + GdkDragContext *context, + guint32 time) +@@ -252,15 +252,22 @@ get_drag_data (NautilusTreeViewDragDest *dest, + target = gtk_drag_dest_find_target (GTK_WIDGET (dest->details->tree_view), + context, + NULL); ++ ++ if (target == GDK_NONE) { ++ return FALSE; ++ } ++ + if (target == gdk_atom_intern (NAUTILUS_ICON_DND_XDNDDIRECTSAVE_TYPE, FALSE) && + !dest->details->drop_occurred) { + dest->details->drag_type = NAUTILUS_ICON_DND_XDNDDIRECTSAVE; + dest->details->have_drag_data = TRUE; +- return; ++ return TRUE; + } + + gtk_drag_get_data (GTK_WIDGET (dest->details->tree_view), + context, target, time); ++ ++ return TRUE; + } + + static void +@@ -455,6 +462,7 @@ drag_motion_callback (GtkWidget *widget, + GtkTreeViewDropPosition pos; + GdkWindow *bin_window; + guint action; ++ gboolean res = TRUE; + + dest = NAUTILUS_TREE_VIEW_DRAG_DEST (data); + +@@ -463,8 +471,13 @@ drag_motion_callback (GtkWidget *widget, + + + if (!dest->details->have_drag_data) { +- get_drag_data (dest, context, time); ++ res = get_drag_data (dest, context, time); + } ++ ++ if (!res) { ++ return FALSE; ++ } ++ + drop_path = get_drop_path (dest, path); + + action = 0; +-- +cgit v0.8.2 diff --git a/nautilus.spec b/nautilus.spec index 22e3416..1b92b36 100644 --- a/nautilus.spec +++ b/nautilus.spec @@ -16,7 +16,7 @@ Name: nautilus Summary: File manager for GNOME Version: 2.26.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: User Interface/Desktops Source: http://download.gnome.org/sources/%{name}/2.26/%{name}-%{version}.tar.bz2 @@ -94,6 +94,10 @@ Patch18: nautilus-2.27.2-dark-text-on-dark-bg.patch # Don't load files for thumbnailing that we can't thumbnail anyway Patch19: nautilus-2.28.0-thumbnailing-limit.patch +# Nautilus crashing on drag and drop from file-roller +# https://bugzilla.redhat.com/show_bug.cgi?id=513230 +Patch20: nautilus-2.28.2-dnd-crash.patch + %description Nautilus is the file manager and graphical shell for the GNOME desktop @@ -134,6 +138,7 @@ for developing nautilus extensions. %patch17 -p0 -b .symlink %patch18 -p1 -b .dark-text %patch19 -p1 -b .thumbnail-limit +%patch20 -p1 -b .dnd-crash %build @@ -271,6 +276,9 @@ fi %changelog +* Thu Dec 3 2009 Tomas Bzatek - 2.26.4-3 +- Fix Nautilus crash on drag and drop from file-roller (#513230) + * Fri Sep 25 2009 Tomas Bzatek - 2.26.4-2 - Don't load files for thumbnailing that we can't thumbnail anyway