[obconf] don't set the theme preview if a null is returned (#692549)
Miroslav Lichvar
mlichvar at fedoraproject.org
Mon May 2 14:21:25 UTC 2011
commit 11d654be3e7d370593982bda9a19b1e32572deef
Author: Miroslav Lichvar <mlichvar at redhat.com>
Date: Mon May 2 16:17:30 2011 +0200
don't set the theme preview if a null is returned (#692549)
obconf-themeprev.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
obconf.spec | 2 ++
2 files changed, 44 insertions(+), 0 deletions(-)
---
diff --git a/obconf-themeprev.patch b/obconf-themeprev.patch
new file mode 100644
index 0000000..981d42d
--- /dev/null
+++ b/obconf-themeprev.patch
@@ -0,0 +1,42 @@
+This is a backport of:
+
+commit e3545ed4e522e3495df95a8bf0c4e16f543b9e00
+Author: Dana Jansens <danakj at orodu.net>
+Date: Mon Dec 21 14:32:04 2009 -0500
+
+ don't set the theme preview if a null is returned (trying to fix bug #3285)
+
+diff -up obconf/src/preview_update.c.themeprev obconf/src/preview_update.c
+--- obconf/src/preview_update.c.themeprev 2009-12-21 17:06:13.000000000 +0100
++++ obconf/src/preview_update.c 2011-05-02 15:54:31.181952575 +0200
+@@ -1,4 +1,5 @@
+ #include "preview_update.h"
++#include "preview.h"
+ #include "main.h"
+
+ static gboolean restart_theme_preview_update = TRUE;
+@@ -87,6 +88,7 @@ void preview_update_set_title_layout(con
+ static gboolean update_theme_preview_iterate(gpointer data)
+ {
+ GtkListStore *ls = data;
++ GdkPixbuf *preview;
+ static GtkTreeIter iter;
+ gchar *name;
+
+@@ -120,11 +122,11 @@ static gboolean update_theme_preview_ite
+
+ gtk_tree_model_get(GTK_TREE_MODEL(ls), &iter, 0, &name, -1);
+
+- gtk_list_store_set(GTK_LIST_STORE(ls), &iter, 1,
+- preview_theme(name, title_layout, active_window_font,
+- inactive_window_font, menu_title_font,
+- menu_item_font, osd_font),
+- -1);
++ preview = preview_theme(name, title_layout, active_window_font,
++ inactive_window_font, menu_title_font,
++ menu_item_font, osd_font);
++ if (preview)
++ gtk_list_store_set(GTK_LIST_STORE(ls), &iter, 1, preview, -1);
+
+ return TRUE;
+ }
diff --git a/obconf.spec b/obconf.spec
index 048ea56..e9cac56 100644
--- a/obconf.spec
+++ b/obconf.spec
@@ -9,6 +9,7 @@ URL: http://icculus.org/openbox/index.php/ObConf:About
#Source0: http://icculus.org/openbox/obconf/%{name}-%{version}.tar.gz
Source0: obconf-20091221gitc8ac23.tar.gz
Patch0: obconf-trans.patch
+Patch1: obconf-themeprev.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: openbox-devel >= 3.4
@@ -26,6 +27,7 @@ ObConf is a graphical configuration editor for the Openbox window manager.
%prep
%setup -q -n %{name}
%patch0 -p1
+%patch1 -p1 -b .themeprev
%build
More information about the scm-commits
mailing list