From 984c0f8bf41431e59f738b8a3c0338fd2940a600 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Sep 14 2006 08:47:57 +0000 Subject: - Fix crash when opening custom icon dialog (#205352) --- diff --git a/nautilus-2.16.0-model-crash.patch b/nautilus-2.16.0-model-crash.patch new file mode 100644 index 0000000..bf95c3e --- /dev/null +++ b/nautilus-2.16.0-model-crash.patch @@ -0,0 +1,196 @@ +Index: src/nautilus-places-sidebar.c +=================================================================== +RCS file: /cvs/gnome/nautilus/src/nautilus-places-sidebar.c,v +retrieving revision 1.24 +retrieving revision 1.25 +diff -u -p -r1.24 -r1.25 +--- src/nautilus-places-sidebar.c 24 Jul 2006 22:45:37 -0000 1.24 ++++ src/nautilus-places-sidebar.c 13 Sep 2006 20:09:19 -0000 1.25 +@@ -128,12 +128,12 @@ enum { + }; + + /* Target types for dragging from the shortcuts list */ +-static const GtkTargetEntry shortcuts_source_targets[] = { ++static const GtkTargetEntry nautilus_shortcuts_source_targets[] = { + { "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, GTK_TREE_MODEL_ROW } + }; + + /* Target types for dropping into the shortcuts list */ +-static const GtkTargetEntry shortcuts_drop_targets [] = { ++static const GtkTargetEntry nautilus_shortcuts_drop_targets [] = { + { "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, GTK_TREE_MODEL_ROW }, + { "text/uri-list", 0, TEXT_URI_LIST } + }; +@@ -143,27 +143,27 @@ typedef struct { + GtkTreeModelFilter parent; + + NautilusPlacesSidebar *sidebar; +-} ShortcutsModelFilter; ++} NautilusShortcutsModelFilter; + + typedef struct { + GtkTreeModelFilterClass parent_class; +-} ShortcutsModelFilterClass; ++} NautilusShortcutsModelFilterClass; + +-#define SHORTCUTS_MODEL_FILTER_TYPE (_shortcuts_model_filter_get_type ()) +-#define SHORTCUTS_MODEL_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHORTCUTS_MODEL_FILTER_TYPE, ShortcutsModelFilter)) ++#define NAUTILUS_SHORTCUTS_MODEL_FILTER_TYPE (_nautilus_shortcuts_model_filter_get_type ()) ++#define NAUTILUS_SHORTCUTS_MODEL_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_SHORTCUTS_MODEL_FILTER_TYPE, NautilusShortcutsModelFilter)) + +-GType _shortcuts_model_filter_get_type (void); +-static void shortcuts_model_filter_drag_source_iface_init (GtkTreeDragSourceIface *iface); ++GType _nautilus_shortcuts_model_filter_get_type (void); ++static void nautilus_shortcuts_model_filter_drag_source_iface_init (GtkTreeDragSourceIface *iface); + +-G_DEFINE_TYPE_WITH_CODE (ShortcutsModelFilter, +- _shortcuts_model_filter, ++G_DEFINE_TYPE_WITH_CODE (NautilusShortcutsModelFilter, ++ _nautilus_shortcuts_model_filter, + GTK_TYPE_TREE_MODEL_FILTER, + G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_DRAG_SOURCE, +- shortcuts_model_filter_drag_source_iface_init)); ++ nautilus_shortcuts_model_filter_drag_source_iface_init)); + +-static GtkTreeModel *shortcuts_model_filter_new (NautilusPlacesSidebar *sidebar, +- GtkTreeModel *child_model, +- GtkTreePath *root); ++static GtkTreeModel *nautilus_shortcuts_model_filter_new (NautilusPlacesSidebar *sidebar, ++ GtkTreeModel *child_model, ++ GtkTreePath *root); + + G_DEFINE_TYPE_WITH_CODE (NautilusPlacesSidebar, nautilus_places_sidebar, GTK_TYPE_SCROLLED_WINDOW, + G_IMPLEMENT_INTERFACE (NAUTILUS_TYPE_SIDEBAR, +@@ -383,9 +383,9 @@ update_places_cb (gpointer data) + } + + static gboolean +-shortcuts_row_separator_func (GtkTreeModel *model, +- GtkTreeIter *iter, +- gpointer data) ++nautilus_shortcuts_row_separator_func (GtkTreeModel *model, ++ GtkTreeIter *iter, ++ gpointer data) + { + PlaceType type; + +@@ -1512,7 +1512,7 @@ nautilus_places_sidebar_init (NautilusPl + G_CALLBACK (bookmarks_editing_canceled), sidebar); + + gtk_tree_view_set_row_separator_func (tree_view, +- shortcuts_row_separator_func, ++ nautilus_shortcuts_row_separator_func, + NULL, + NULL); + +@@ -1528,9 +1528,9 @@ nautilus_places_sidebar_init (NautilusPl + GDK_TYPE_PIXBUF, + G_TYPE_INT + ); +- sidebar->filter_model = shortcuts_model_filter_new (sidebar, +- GTK_TREE_MODEL (sidebar->store), +- NULL); ++ sidebar->filter_model = nautilus_shortcuts_model_filter_new (sidebar, ++ GTK_TREE_MODEL (sidebar->store), ++ NULL); + + gtk_tree_view_set_model (tree_view, sidebar->filter_model); + gtk_container_add (GTK_CONTAINER (sidebar), GTK_WIDGET (tree_view)); +@@ -1549,12 +1549,12 @@ nautilus_places_sidebar_init (NautilusPl + + gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (tree_view), + GDK_BUTTON1_MASK, +- shortcuts_source_targets, +- G_N_ELEMENTS (shortcuts_source_targets), ++ nautilus_shortcuts_source_targets, ++ G_N_ELEMENTS (nautilus_shortcuts_source_targets), + GDK_ACTION_MOVE); + gtk_drag_dest_set (GTK_WIDGET (tree_view), + 0, +- shortcuts_drop_targets, G_N_ELEMENTS (shortcuts_drop_targets), ++ nautilus_shortcuts_drop_targets, G_N_ELEMENTS (nautilus_shortcuts_drop_targets), + GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK); + + g_signal_connect (tree_view, "key-press-event", +@@ -1731,27 +1731,27 @@ nautilus_places_sidebar_register (void) + /* Drag and drop interfaces */ + + static void +-_shortcuts_model_filter_class_init (ShortcutsModelFilterClass *class) ++_nautilus_shortcuts_model_filter_class_init (NautilusShortcutsModelFilterClass *class) + { + } + + static void +-_shortcuts_model_filter_init (ShortcutsModelFilter *model) ++_nautilus_shortcuts_model_filter_init (NautilusShortcutsModelFilter *model) + { + model->sidebar = NULL; + } + + /* GtkTreeDragSource::row_draggable implementation for the shortcuts filter model */ + static gboolean +-shortcuts_model_filter_row_draggable (GtkTreeDragSource *drag_source, +- GtkTreePath *path) ++nautilus_shortcuts_model_filter_row_draggable (GtkTreeDragSource *drag_source, ++ GtkTreePath *path) + { +- ShortcutsModelFilter *model; ++ NautilusShortcutsModelFilter *model; + int pos; + int bookmarks_pos; + int num_bookmarks; + +- model = SHORTCUTS_MODEL_FILTER (drag_source); ++ model = NAUTILUS_SHORTCUTS_MODEL_FILTER (drag_source); + + pos = *gtk_tree_path_get_indices (path); + bookmarks_pos = get_bookmark_index (model->sidebar->tree_view); +@@ -1762,13 +1762,13 @@ shortcuts_model_filter_row_draggable (Gt + + /* GtkTreeDragSource::drag_data_get implementation for the shortcuts filter model */ + static gboolean +-shortcuts_model_filter_drag_data_get (GtkTreeDragSource *drag_source, +- GtkTreePath *path, +- GtkSelectionData *selection_data) ++nautilus_shortcuts_model_filter_drag_data_get (GtkTreeDragSource *drag_source, ++ GtkTreePath *path, ++ GtkSelectionData *selection_data) + { +- ShortcutsModelFilter *model; ++ NautilusShortcutsModelFilter *model; + +- model = SHORTCUTS_MODEL_FILTER (drag_source); ++ model = NAUTILUS_SHORTCUTS_MODEL_FILTER (drag_source); + + /* FIXME */ + +@@ -1777,20 +1777,20 @@ shortcuts_model_filter_drag_data_get (Gt + + /* Fill the GtkTreeDragSourceIface vtable */ + static void +-shortcuts_model_filter_drag_source_iface_init (GtkTreeDragSourceIface *iface) ++nautilus_shortcuts_model_filter_drag_source_iface_init (GtkTreeDragSourceIface *iface) + { +- iface->row_draggable = shortcuts_model_filter_row_draggable; +- iface->drag_data_get = shortcuts_model_filter_drag_data_get; ++ iface->row_draggable = nautilus_shortcuts_model_filter_row_draggable; ++ iface->drag_data_get = nautilus_shortcuts_model_filter_drag_data_get; + } + + static GtkTreeModel * +-shortcuts_model_filter_new (NautilusPlacesSidebar *sidebar, +- GtkTreeModel *child_model, +- GtkTreePath *root) ++nautilus_shortcuts_model_filter_new (NautilusPlacesSidebar *sidebar, ++ GtkTreeModel *child_model, ++ GtkTreePath *root) + { +- ShortcutsModelFilter *model; ++ NautilusShortcutsModelFilter *model; + +- model = g_object_new (SHORTCUTS_MODEL_FILTER_TYPE, ++ model = g_object_new (NAUTILUS_SHORTCUTS_MODEL_FILTER_TYPE, + "child-model", child_model, + "virtual-root", root, + NULL); diff --git a/nautilus.spec b/nautilus.spec index 6df7ab7..cdd075a 100644 --- a/nautilus.spec +++ b/nautilus.spec @@ -23,7 +23,7 @@ Name: nautilus Summary: Nautilus is a file manager for GNOME. Version: 2.16.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPL Group: User Interface/Desktops Source: ftp://ftp.gnome.org/pub/GNOME/sources/2.7/%{name}/%{name}-%{version}.tar.bz2 @@ -83,6 +83,7 @@ Obsoletes: nautilus-media Patch1: nautilus-2.5.7-rhconfig.patch Patch2: nautilus-2.15.2-format.patch Patch3: background-no-delay.patch +Patch4: nautilus-2.16.0-model-crash.patch %description Nautilus integrates access to files, applications, media, @@ -113,6 +114,7 @@ for writing nautilus extensions. %patch1 -p1 -b .rhconfig %patch2 -p1 -b .format %patch3 -p1 -b .no-delay +%patch4 -p0 -b .model-crash %build @@ -200,6 +202,9 @@ scrollkeeper-update %{_libdir}/*.so %changelog +* Thu Sep 14 2006 Alexander Larsson - 2.16.0-3 +- Fix crash when opening custom icon dialog (#205352) + * Tue Sep 5 2006 Matthias Clasen - 2.16.0-2 - Add a %%preun script (#205260)