catch error with old/incomplete desktop installations

git-svn-id: svn://svn.berlios.de/gpodder/trunk@365 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This commit is contained in:
Thomas Perl 2007-08-10 13:00:43 +00:00
parent 14eb785419
commit 03e947c9b7
4 changed files with 22 additions and 4 deletions

View file

@ -1,3 +1,13 @@
Fri, 10 Aug 2007 14:57:47 +0200 <thp@perli.net>
* src/gpodder/libpodcasts.py: Catch error when the
"applications-internet" icon is not available in the default icon
theme and use no icon instead if it's not available; this fixes
an error with a broken channel list; thanks to Richard Voigt
(richardvoigt gmail com) for reporting this bug and help tracking
down the problem
* src/gpodder/gui.py: Catch error when using an older PyGTK version
that doesn't support the "alignment" property of CellRendererText
Thu, 09 Aug 2007 13:27:18 +0200 <thp@perli.net>
* src/gpodder/libipodsync.py: I shouldn't write code with my brain
switched off. (Added return statement for add_episode_from_channel()

View file

@ -32,8 +32,8 @@ or played back on the user's desktop.
# PLEASE DO NOT CHANGE FORMAT OF __version__ LINE (setup.py reads this)
__author__ = "Thomas Perl <thp@perli.net>"
__version__ = "0.9.4+svn20070807"
__date__ = "2007-08-07"
__version__ = "0.9.4+svn20070810"
__date__ = "2007-08-10"
__copyright__ = "Copyright (c) 2005-2007 %s. All rights reserved." % __author__
__licence__ = "GPL"

View file

@ -122,7 +122,10 @@ class Gpodder(SimpleGladeApp):
# new episodes
cellrenderer = gtk.CellRendererText()
cellrenderer.set_property('ellipsize', pango.ELLIPSIZE_END)
cellrenderer.set_property('alignment', pango.ALIGN_RIGHT)
try:
cellrenderer.set_property('alignment', pango.ALIGN_RIGHT)
except:
log('Failed to set alignment property for CellRendererText - using old PyGTK?', sender = self)
cellrenderer.set_property( 'foreground', 'gray')
self.comboAvailable.pack_end( cellrenderer, True)
self.comboAvailable.add_attribute( cellrenderer, 'text', 3)

View file

@ -713,7 +713,12 @@ def channelsToModel( channels, download_status_manager = None):
if not iconsize:
iconsize = gtk.icon_size_register('channel-icon',32,32)
icon_theme = gtk.icon_theme_get_default()
new_model.set( new_iter, 8, icon_theme.load_icon('applications-internet', iconsize, 0))
globe_icon_name = 'applications-internet'
try:
new_model.set( new_iter, 8, icon_theme.load_icon(globe_icon_name, iconsize, 0))
except:
log( 'Cannot load "%s" icon (using an old or incomplete icon theme?)', globe_icon_name)
new_model.set( new_iter, 8, None)
pos = pos + 1