summaryrefslogtreecommitdiffstats
path: root/meta-xfce/recipes-xfce/thunar
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmx.de>2011-08-12 06:21:22 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2011-08-12 08:20:06 +0200
commit187c1c9bb8679bb07636730e01b9c3c4c5ed9cdf (patch)
tree9c5416b3e04bc86877b90adee9f5fba9332d1467 /meta-xfce/recipes-xfce/thunar
parent1eaf2af7ee24e009dc48721b77f022c7404644a7 (diff)
downloadmeta-openembedded-187c1c9bb8679bb07636730e01b9c3c4c5ed9cdf.tar.gz
thunar: Fix segfault in case no icon-theme is selected/installed
The patch was sent to xfce bug list [1]. As long as it not applied, make thunar work for us. [1] https://bugzilla.xfce.org/show_bug.cgi?id=7880 Signed-off-by: Andreas Mueller <schnitzeltony@gmx.de> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-xfce/recipes-xfce/thunar')
-rw-r--r--meta-xfce/recipes-xfce/thunar/thunar/fix-segfault-no-icons.patch61
-rw-r--r--meta-xfce/recipes-xfce/thunar/thunar_1.2.2.bb7
2 files changed, 63 insertions, 5 deletions
diff --git a/meta-xfce/recipes-xfce/thunar/thunar/fix-segfault-no-icons.patch b/meta-xfce/recipes-xfce/thunar/thunar/fix-segfault-no-icons.patch
new file mode 100644
index 000000000..f0ff412dc
--- /dev/null
+++ b/meta-xfce/recipes-xfce/thunar/thunar/fix-segfault-no-icons.patch
@@ -0,0 +1,61 @@
1From 5066ca4983d82352fca078525e2be454b263fdfd Mon Sep 17 00:00:00 2001
2From: Andreas Mueller <schnitzeltony@gmx.de>
3Date: Thu, 11 Aug 2011 10:00:33 +0200
4Subject: [PATCH] Fix segfaults in case icons are missing or not found
5
6
7Signed-off-by: Andreas Mueller <schnitzeltony@gmx.de>
8---
9 thunar/thunar-location-button.c | 7 +++++--
10 thunar/thunar-window.c | 13 +++++++++----
11 2 files changed, 14 insertions(+), 6 deletions(-)
12
13diff --git a/thunar/thunar-location-button.c b/thunar/thunar-location-button.c
14index 49be1f4..20d7110 100644
15--- a/thunar/thunar-location-button.c
16+++ b/thunar/thunar-location-button.c
17@@ -462,9 +462,12 @@ thunar_location_button_file_changed (ThunarLocationButton *location_button,
18 /* update the icon for the image */
19 icon_factory = thunar_icon_factory_get_for_icon_theme (icon_theme);
20 icon = thunar_icon_factory_load_file_icon (icon_factory, file, location_button->file_icon_state, size);
21- gtk_image_set_from_pixbuf (GTK_IMAGE (location_button->image), icon);
22+ if (G_LIKELY (icon != NULL))
23+ {
24+ gtk_image_set_from_pixbuf (GTK_IMAGE (location_button->image), icon);
25+ g_object_unref (G_OBJECT (icon));
26+ }
27 g_object_unref (G_OBJECT (icon_factory));
28- g_object_unref (G_OBJECT (icon));
29
30 /* show the image widget */
31 gtk_widget_show (location_button->image);
32diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
33index d258d8f..2ed1af7 100644
34--- a/thunar/thunar-window.c
35+++ b/thunar/thunar-window.c
36@@ -2410,13 +2410,18 @@ thunar_window_current_directory_changed (ThunarFile *current_directory,
37 gtk_action_set_sensitive (action, (thunar_file_get_item_count (current_directory) > 0));
38 gtk_action_set_visible (action, (thunar_file_is_root (current_directory) && thunar_file_is_trashed (current_directory)));
39
40- /* set window title and icon */
41+ /* set window title */
42 title = g_strdup_printf ("%s - %s", thunar_file_get_display_name (current_directory), _("File Manager"));
43- icon = thunar_icon_factory_load_file_icon (window->icon_factory, current_directory, THUNAR_FILE_ICON_STATE_DEFAULT, 48);
44 gtk_window_set_title (GTK_WINDOW (window), title);
45- gtk_window_set_icon (GTK_WINDOW (window), icon);
46- g_object_unref (G_OBJECT (icon));
47 g_free (title);
48+
49+ /* set window icon */
50+ icon = thunar_icon_factory_load_file_icon (window->icon_factory, current_directory, THUNAR_FILE_ICON_STATE_DEFAULT, 48);
51+ if (G_LIKELY (icon != NULL))
52+ {
53+ gtk_window_set_icon (GTK_WINDOW (window), icon);
54+ g_object_unref (G_OBJECT (icon));
55+ }
56 }
57
58
59--
601.7.4.4
61
diff --git a/meta-xfce/recipes-xfce/thunar/thunar_1.2.2.bb b/meta-xfce/recipes-xfce/thunar/thunar_1.2.2.bb
index c978855af..1c553ab9a 100644
--- a/meta-xfce/recipes-xfce/thunar/thunar_1.2.2.bb
+++ b/meta-xfce/recipes-xfce/thunar/thunar_1.2.2.bb
@@ -4,21 +4,18 @@ LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" 4LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
5DEPENDS = "exo gtk+ gdk-pixbuf libxfce4util libxfce4ui libsm dbus-glib startup-notification libnotify" 5DEPENDS = "exo gtk+ gdk-pixbuf libxfce4util libxfce4ui libsm dbus-glib startup-notification libnotify"
6 6
7PR = "r0" 7PR = "r1"
8 8
9inherit xfce 9inherit xfce
10 10
11# SRC_URI must follow inherited one 11# SRC_URI must follow inherited one
12SRC_URI = "http://archive.xfce.org/src/xfce/${PN}/${@'${PV}'[0:3]}/Thunar-${PV}.tar.bz2 \ 12SRC_URI = "http://archive.xfce.org/src/xfce/${PN}/${@'${PV}'[0:3]}/Thunar-${PV}.tar.bz2 \
13 file://relative-symlinks-docs.patch \ 13 file://relative-symlinks-docs.patch \
14 file://fix-segfault-no-icons.patch \
14" 15"
15 16
16S = "${WORKDIR}/Thunar-${PV}/" 17S = "${WORKDIR}/Thunar-${PV}/"
17 18
18
19# no/minimum(default)/yes/full(fails <- Werror)
20#EXTRA_OECONF += "--enable-debug=yes"
21
22FILES_${PN} += "${libdir}/thunarx-2/* \ 19FILES_${PN} += "${libdir}/thunarx-2/* \
23 ${libdir}/xfce4/panel/plugins/* \ 20 ${libdir}/xfce4/panel/plugins/* \
24 ${libdir}/Thunar/[Tt]hunar* \ 21 ${libdir}/Thunar/[Tt]hunar* \