[xfce4-appfinder] Add patch to fix segfault with icon theme handling

Kevin Fenzi kevin at fedoraproject.org
Sat Mar 30 03:10:25 UTC 2013


commit ea6bc46ee6a24e3d272ec44d71dd3f7232ab3d29
Author: Kevin Fenzi <kevin at scrye.com>
Date:   Fri Mar 29 21:10:20 2013 -0600

    Add patch to fix segfault with icon theme handling
    
    - https://bugzilla.xfce.org/show_bug.cgi?id=9730

 xfce4-appfinder-4.10.0-icon-theme-segfault.patch |   63 ++++++++++++++++++++++
 xfce4-appfinder.spec                             |   10 +++-
 2 files changed, 72 insertions(+), 1 deletions(-)
---
diff --git a/xfce4-appfinder-4.10.0-icon-theme-segfault.patch b/xfce4-appfinder-4.10.0-icon-theme-segfault.patch
new file mode 100644
index 0000000..02e3e7b
--- /dev/null
+++ b/xfce4-appfinder-4.10.0-icon-theme-segfault.patch
@@ -0,0 +1,63 @@
+From eb46f5acd4b0b985a94bee6942d6527f9f620b84 Mon Sep 17 00:00:00 2001
+From: Nick Schermer <nick at xfce.org>
+Date: Sat, 16 Mar 2013 18:03:01 +0000
+Subject: Detatch from icon theme to avoid segfault (bug #9730).
+
+---
+diff --git a/src/appfinder-window.c b/src/appfinder-window.c
+index d3cd567..b5ca272 100644
+--- a/src/appfinder-window.c
++++ b/src/appfinder-window.c
+@@ -129,6 +129,8 @@ struct _XfceAppfinderWindow
+ 
+   XfceAppfinderActions       *actions;
+ 
++  GtkIconTheme               *icon_theme;
++
+   GtkEntryCompletion         *completion;
+ 
+   XfconfChannel              *channel;
+@@ -204,7 +206,6 @@ xfce_appfinder_window_init (XfceAppfinderWindow *window)
+   GtkWidget          *bbox;
+   GtkWidget          *button;
+   GtkEntryCompletion *completion;
+-  GtkIconTheme       *icon_theme;
+   gint                integer;
+ 
+   window->channel = xfconf_channel_get ("xfce4-appfinder");
+@@ -400,9 +401,10 @@ xfce_appfinder_window_init (XfceAppfinderWindow *window)
+   image = gtk_image_new_from_stock (GTK_STOCK_EXECUTE, GTK_ICON_SIZE_BUTTON);
+   gtk_button_set_image (GTK_BUTTON (button), image);
+ 
+-  icon_theme = gtk_icon_theme_get_for_screen (gtk_window_get_screen (GTK_WINDOW (window)));
+-  g_signal_connect_swapped (G_OBJECT (icon_theme), "changed",
++  window->icon_theme = gtk_icon_theme_get_for_screen (gtk_window_get_screen (GTK_WINDOW (window)));
++  g_signal_connect_swapped (G_OBJECT (window->icon_theme), "changed",
+       G_CALLBACK (xfce_appfinder_window_icon_theme_changed), window);
++  g_object_ref (G_OBJECT (window->icon_theme));
+ 
+   /* load categories in the model */
+   xfce_appfinder_window_category_set_categories (NULL, window);
+@@ -432,6 +434,11 @@ xfce_appfinder_window_finalize (GObject *object)
+   g_signal_handler_disconnect (window->channel, window->property_watch_id);
+   g_signal_handler_disconnect (window->model, window->categories_changed_id);
+ 
++  /* release our reference on the icon theme */
++  g_signal_handlers_disconnect_by_func (G_OBJECT (window->icon_theme),
++      xfce_appfinder_window_icon_theme_changed, window);
++  g_object_unref (G_OBJECT (window->icon_theme));
++
+   g_object_unref (G_OBJECT (window->model));
+   g_object_unref (G_OBJECT (window->category_model));
+   g_object_unref (G_OBJECT (window->completion));
+@@ -1520,6 +1527,8 @@ xfce_appfinder_window_row_activated (XfceAppfinderWindow *window)
+ static void
+ xfce_appfinder_window_icon_theme_changed (XfceAppfinderWindow *window)
+ {
++  appfinder_return_if_fail (XFCE_IS_APPFINDER_WINDOW (window));
++
+   if (window->icon_find != NULL)
+     g_object_unref (G_OBJECT (window->icon_find));
+   window->icon_find = xfce_appfinder_model_load_pixbuf (GTK_STOCK_FIND, XFCE_APPFINDER_ICON_SIZE_48);
+--
+cgit v0.9.1
diff --git a/xfce4-appfinder.spec b/xfce4-appfinder.spec
index 082f4e3..2e2994f 100644
--- a/xfce4-appfinder.spec
+++ b/xfce4-appfinder.spec
@@ -2,7 +2,7 @@
 
 Name:           xfce4-appfinder
 Version:        4.10.0
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Appfinder for the Xfce4 Desktop Environment
 
 Group:          User Interface/Desktops
@@ -13,6 +13,9 @@ Source0:        http://archive.xfce.org/src/xfce/%{name}/%{xfceversion}/%{name}-
 # https://bugzilla.xfce.org/show_bug.cgi?id=9109
 # http://git.xfce.org/xfce/xfce4-appfinder/commit/?id=2a14564c
 Patch0:         xfce4-appfinder-4.10.0-null-pointers.patch
+# https://bugzilla.xfce.org/show_bug.cgi?id=9730
+# http://git.xfce.org/xfce/xfce4-appfinder/commit/?id=eb46f5acd4b0b985a94bee6942d6527f9f620b84
+Patch1:         xfce4-appfinder-4.10.0-icon-theme-segfault.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  pkgconfig(dbus-glib-1) >= 0.84
@@ -32,6 +35,7 @@ xfce-appfinder shows system wide installed applications.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 
 %build
@@ -63,6 +67,10 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Fri Mar 29 2013 Kevin Fenzi <kevin at scrye.com> 4.10.0-5
+- Add patch to fix segfault with icon theme handling
+- https://bugzilla.xfce.org/show_bug.cgi?id=9730
+
 * Fri Feb 15 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.10.0-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list