gnome-games r7604 - in branches/gnome-2-22/glchess: . src/lib/gtkui
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r7604 - in branches/gnome-2-22/glchess: . src/lib/gtkui
- Date: Thu, 10 Apr 2008 02:32:40 +0100 (BST)
Author: rancell
Date: Thu Apr 10 02:32:40 2008
New Revision: 7604
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7604&view=rev
Log:
Handle missing throbber icons (Bug #524829)
Modified:
branches/gnome-2-22/glchess/ChangeLog
branches/gnome-2-22/glchess/src/lib/gtkui/dialogs.py
branches/gnome-2-22/glchess/src/lib/gtkui/gtkui.py
branches/gnome-2-22/glchess/src/lib/gtkui/network.py
Modified: branches/gnome-2-22/glchess/src/lib/gtkui/dialogs.py
==============================================================================
--- branches/gnome-2-22/glchess/src/lib/gtkui/dialogs.py (original)
+++ branches/gnome-2-22/glchess/src/lib/gtkui/dialogs.py Thu Apr 10 02:32:40 2008
@@ -167,7 +167,6 @@
levels = [('easy', _('Easy'), 'weather-few-clouds'),
('normal', _('Normal'), 'weather-overcast'),
('hard', _('Hard'), 'weather-storm')]
- iconTheme = gtk.icon_theme_get_default()
for (key, label, icon) in levels:
iter = levelModel.append()
levelModel.set(iter, 0, key, 1, icon, 2, label)
Modified: branches/gnome-2-22/glchess/src/lib/gtkui/gtkui.py
==============================================================================
--- branches/gnome-2-22/glchess/src/lib/gtkui/gtkui.py (original)
+++ branches/gnome-2-22/glchess/src/lib/gtkui/gtkui.py Thu Apr 10 02:32:40 2008
@@ -228,7 +228,6 @@
# Create the model for the player types
self.__playerModel = gtk.ListStore(str, str, str)
- iconTheme = gtk.icon_theme_get_default()
iter = self.__playerModel.append()
self.__playerModel.set(iter, 0, '', 1, 'stock_person', 2, _('Human'))
@@ -322,7 +321,6 @@
'name' is the name of the engine.
TODO: difficulty etc etc
"""
- iconTheme = gtk.icon_theme_get_default()
iter = self.__playerModel.append()
self.__playerModel.set(iter, 0, name, 1, 'stock_notebook', 2, name)
Modified: branches/gnome-2-22/glchess/src/lib/gtkui/network.py
==============================================================================
--- branches/gnome-2-22/glchess/src/lib/gtkui/network.py (original)
+++ branches/gnome-2-22/glchess/src/lib/gtkui/network.py Thu Apr 10 02:32:40 2008
@@ -341,12 +341,18 @@
size = 32
self._throbberFrames = []
- icon = theme.load_icon('process-idle', size, 0)
- if icon is not None:
+ try:
+ icon = theme.load_icon('process-idle', size, 0)
+ except gobject.GError:
+ pass
+ else:
self._throbberFrames.append(icon)
- icon = theme.load_icon('process-working', size, 0)
- if icon is not None:
+ try:
+ icon = theme.load_icon('process-working', size, 0)
+ except gobject.GError:
+ pass
+ else:
# If a smaller icon was received than expected then use that size
height = icon.get_height()
width = icon.get_width()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]