pessulus r350 - in trunk: . Pessulus
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: pessulus r350 - in trunk: . Pessulus
- Date: Mon, 17 Mar 2008 15:41:38 +0000 (GMT)
Author: vuntz
Date: Mon Mar 17 15:41:38 2008
New Revision: 350
URL: http://svn.gnome.org/viewvc/pessulus?rev=350&view=rev
Log:
2008-03-17 Vincent Untz <vuntz gnome org>
* Pessulus/disabledapplets.py: (__fill_liststore): fix exception raised
when there's no name for an applet.
Also really try to get the best translation by remembering we've found
one, instead of just replacing the name whenever there's a new one.
* Pessulus/icons.py: (load_icon): explicitly return None instead of
nothing in case of error
Modified:
trunk/ChangeLog
trunk/Pessulus/disabledapplets.py
trunk/Pessulus/icons.py
Modified: trunk/Pessulus/disabledapplets.py
==============================================================================
--- trunk/Pessulus/disabledapplets.py (original)
+++ trunk/Pessulus/disabledapplets.py Mon Mar 17 15:41:38 2008
@@ -177,14 +177,22 @@
if prop.name[:5] == "name-" and prop.name[5:] in languages:
if bestname > languages.index (prop.name[5:]) or bestname == -1:
name = prop.v.value_string
+ bestname = languages.index (prop.name[5:])
elif prop.name == "name" and bestname == -1:
name = prop.v.value_string
elif prop.name == "panel:icon":
icon = prop.v.value_string
+
+ if name == None:
+ name = applet.iid
+ else:
+ #FIXME needs to be translated
+ name = name + " (" + applet.iid + ")"
+
iter = self.liststore.append ()
self.liststore.set (iter,
self.COLUMN_IID, applet.iid,
- self.COLUMN_NAME, name + " (" + applet.iid + ")",
+ self.COLUMN_NAME, name,
self.COLUMN_ICON_NAME, icon,
self.COLUMN_ICON, icons.load_icon (self.icon_theme, icon))
Modified: trunk/Pessulus/icons.py
==============================================================================
--- trunk/Pessulus/icons.py (original)
+++ trunk/Pessulus/icons.py Mon Mar 17 15:41:38 2008
@@ -47,12 +47,12 @@
icon_value))
if retval:
return retval
-
+
return None
def load_icon (icon_theme, icon_value):
if not icon_value:
- return
+ return None
if os.path.isabs (icon_value):
icon = load_icon_from_path (icon_value)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]