[deskbar-applet] Fixed bug #580188: self._desktop is None in OpenDesktopFileAction.py



commit 28dd21584551742624aa9b4ea0dc5912a9cedb83
Author: Sebastian Pölsterl <sebp k-d-w org>
Date:   Tue Apr 28 14:31:06 2009 +0200

    Fixed bug #580188: self._desktop is None in OpenDesktopFileAction.py
---
 deskbar/handlers/actions/OpenDesktopFileAction.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/deskbar/handlers/actions/OpenDesktopFileAction.py b/deskbar/handlers/actions/OpenDesktopFileAction.py
index 3d4802e..84950f1 100644
--- a/deskbar/handlers/actions/OpenDesktopFileAction.py
+++ b/deskbar/handlers/actions/OpenDesktopFileAction.py
@@ -37,7 +37,10 @@ class OpenDesktopFileAction(deskbar.interfaces.Action):
         return exists(self._desktop_file)
     
     def get_icon(self):
-        return self._desktop.get_string(gnomedesktop.KEY_ICON)
+        if self._desktop != None:
+            return self._desktop.get_string(gnomedesktop.KEY_ICON)
+        else:
+            return "gtk-open"
     
     def get_name(self, text=None):
         name_dict = {"name": self._name}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]