From 0ccd0ec4165a2a22af02707a82dae5067f6187c4 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Apr 16 2008 18:36:10 +0000 Subject: - Make glchess behave better in case of incomplete icon themes (bug 440686) --- diff --git a/gnome-games-2.22.1.1-fix-icons.patch b/gnome-games-2.22.1.1-fix-icons.patch new file mode 100644 index 0000000..8c26af3 --- /dev/null +++ b/gnome-games-2.22.1.1-fix-icons.patch @@ -0,0 +1,37 @@ +diff -up gnome-games-2.22.1.1/glchess/src/lib/gtkui/network.py.fix-icons gnome-games-2.22.1.1/glchess/src/lib/gtkui/network.py +--- gnome-games-2.22.1.1/glchess/src/lib/gtkui/network.py.fix-icons 2008-04-16 13:17:55.000000000 -0400 ++++ gnome-games-2.22.1.1/glchess/src/lib/gtkui/network.py 2008-04-16 14:17:44.000000000 -0400 +@@ -341,11 +341,19 @@ class GtkNetworkGameDialog(glchess.ui.Ne + size = 32 + self._throbberFrames = [] + +- icon = theme.load_icon('process-idle', size, 0) ++ try: ++ icon = theme.load_icon('process-idle', size, 0) ++ except gobject.GError, e: ++ icon = None ++ + if icon is not None: + self._throbberFrames.append(icon) + +- icon = theme.load_icon('process-working', size, 0) ++ try: ++ icon = theme.load_icon('process-working', size, 0) ++ except gobject.GError, e: ++ icon = None ++ + if icon is not None: + # If a smaller icon was received than expected then use that size + height = icon.get_height() +@@ -356,7 +364,10 @@ class GtkNetworkGameDialog(glchess.ui.Ne + for j in xrange(width / size): + frame = icon.subpixbuf(j * size, i * size, size, size) + self._throbberFrames.append(frame) +- ++ ++ if len(self._throbberFrames) == 0: ++ self._throbberframes.append(theme.load_icon('image-missing', size, 0)) ++ + # Display idle frame + self._throbberFrame = 0 + self._updateThrobber() diff --git a/gnome-games.spec b/gnome-games.spec index cc92394..b538c75 100644 --- a/gnome-games.spec +++ b/gnome-games.spec @@ -44,13 +44,16 @@ Summary: GNOME games Name: gnome-games Version: 2.22.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 License: GPLv2+ and GFDL+ Group: Amusements/Games Source: http://download.gnome.org/sources/gnome-games/2.22/gnome-games-%{version}.tar.bz2 Patch1: gnome-games-2.19.4-gnometris-rebrand.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=440686 +Patch2: gnome-games-2.22.1.1-fix-icons.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Obsoletes: gnome-games-devel URL: http://www.gnome.org @@ -109,6 +112,7 @@ GNOME desktop environment but can be used under any desktop. %setup -q # rebrand gnometris as some think the name is to similar to a trademark %patch1 -p1 -b .rebrand +%patch2 -p1 -b .fix-icons sed -i -e 's/Gnometris/GnomeFallingBlocks/g' \ -e 's/GNOMEtris/GnomeFallingBlocks/g' \ @@ -326,6 +330,10 @@ fi %changelog +* Wed Apr 16 2008 Ray Strode - 1:2.22.1.1-2 +- Make glchess behave better in case of incomplete icon themes + (bug 440686) + * Tue Apr 8 2008 Matthias Clasen - 1:2.22.1.1-1 - Update to 2.22.1 (sudoko crasher fixes)