gnome-games r8291 - trunk/gnome-sudoku/src/lib
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8291 - trunk/gnome-sudoku/src/lib
- Date: Sun, 9 Nov 2008 09:36:20 +0000 (UTC)
Author: rancell
Date: Sun Nov 9 09:36:20 2008
New Revision: 8291
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8291&view=rev
Log:
Handle errors loading stock icons (Bug #559868)
Modified:
trunk/gnome-sudoku/src/lib/main.py
Modified: trunk/gnome-sudoku/src/lib/main.py
==============================================================================
--- trunk/gnome-sudoku/src/lib/main.py (original)
+++ trunk/gnome-sudoku/src/lib/main.py Sun Nov 9 09:36:20 2008
@@ -22,7 +22,11 @@
icon_factory = gtk.IconFactory()
STOCK_PIXBUFS = {}
for filename,stock_id in [('footprints.png','tracks'),]:
- pb = gtk.gdk.pixbuf_new_from_file(os.path.join(IMAGE_DIR,filename))
+ try:
+ pb = gtk.gdk.pixbuf_new_from_file(os.path.join(IMAGE_DIR,filename))
+ except gobject.GError, e:
+ print 'Failed to load pixbuf: %s' % e
+ continue
STOCK_PIXBUFS[stock_id]=pb
iconset = gtk.IconSet(pb)
icon_factory.add(stock_id,iconset)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]