[X2Go-Commits] pyhoca-gui.git - twofactorauth (branch) updated: 0.1.0.10-241-gebe0667

X2Go dev team git-admin at x2go.org
Sat Sep 14 15:56:09 CEST 2013


The branch, twofactorauth has been updated
       via  ebe0667c3c2a115e5dbdb7b1d08152c166b871a8 (commit)
      from  6aa2c64cfd794a492ff85a4e52c3cee58b1175eb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/changelog        |    2 ++
 pyhoca/wxgui/taskbar.py |   21 +++++++++++----------
 2 files changed, 13 insertions(+), 10 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 6a933a3..e46a53e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -130,6 +130,8 @@ pyhoca-gui (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
       that gets shown during application startup.
     - Only show splash if the splash image file does exist.
     - Fallback to default splash image if the custom splash does not exist.
+    - Do not crash if a provided system tray icon cannot be found. Use a
+      fallback icon instead.
   * Depend on Python X2Go 0.1.2.0.
   * Install GNOME icons via dh_links.
   * Install X2Go icons with explicit install paths.
diff --git a/pyhoca/wxgui/taskbar.py b/pyhoca/wxgui/taskbar.py
index 5aa0a4f..6bd81db 100644
--- a/pyhoca/wxgui/taskbar.py
+++ b/pyhoca/wxgui/taskbar.py
@@ -73,24 +73,23 @@ class PyHocaGUI_TaskBarIcon(wx.TaskBarIcon):
         self.tooltip = ""
 
     def SetIconConnecting(self, profile_name):
-        self.icon = self.MakeIcon(icon_name='pyhoca-trayicon')
         if x2go.X2GOCLIENT_OS == 'Windows':
-            icon_name = self._PyHocaGUI.tray_icon_connecting or self._PyHocaGUI.tray_icon or 'x2go-logo-ubuntu'
-            self.icon = self.MakeIcon(icon_name=icon_name)
+            icon_name = self._PyHocaGUI.tray_icon_connecting or self._PyHocaGUI.tray_icon
+            self.icon = self.MakeIcon(icon_name=icon_name, fallback_name='x2go-logo-ubuntu')
             self.SetIcon(self.icon, _(u"PyHoca-GUI\nConnecting you to ,,%s\'\'") % profile_name)
         else:
-            icon_name = self._PyHocaGUI.tray_icon_connecting or self._PyHocaGUI.tray_icon or 'pyhoca-trayicon'
-            self.icon = self.MakeIcon(icon_name=icon_name)
+            icon_name = self._PyHocaGUI.tray_icon_connecting or self._PyHocaGUI.tray_icon
+            self.icon = self.MakeIcon(icon_name=icon_name, fallback_name='pyhoca-trayicon')
             self.SetIcon(self.icon, _(u"PyHoca-GUI (Python X2goClient)\nCurrently connecting you to remote X2Go server ,,%s\'\'") % profile_name)
 
     def SetIconIdle(self):
         if x2go.X2GOCLIENT_OS == 'Windows':
-            icon_name = self._PyHocaGUI.tray_icon or 'x2go-logo-ubuntu'
-            self.icon = self.MakeIcon(icon_name=icon_name)
+            icon_name = self._PyHocaGUI.tray_icon
+            self.icon = self.MakeIcon(icon_name=icon_name, fallback_name='x2go-logo-ubuntu')
             self.SetIcon(self.icon, _(u"PyHoca-GUI\nConnecting you to X2Go..."))
         else:
-            icon_name = self._PyHocaGUI.tray_icon or 'pyhoca-trayicon'
-            self.icon = self.MakeIcon(icon_name=icon_name)
+            icon_name = self._PyHocaGUI.tray_icon
+            self.icon = self.MakeIcon(icon_name=icon_name, fallback_name='pyhoca-trayicon')
             self.SetIcon(self.icon, _(u"PyHoca-GUI (Python X2goClient)\nClient for connecting you to a remote X2Go server"))
 
     def CreateSessionManagerPopupMenu(self, evt):
@@ -117,11 +116,13 @@ class PyHocaGUI_TaskBarIcon(wx.TaskBarIcon):
         self.menu_optionsmanager = self.PopupMenu(menus_taskbar.PyHocaGUI_Menu_TaskbarOptionsManager(self._PyHocaGUI, caller=self,))
         return self.menu_optionsmanager
 
-    def MakeIcon(self, icon_name):
+    def MakeIcon(self, icon_name, fallback_name='pyhoca-trayicon'):
         """\
         The various platforms have different requirements for the
         icon size...
         """
+        if icon_name is None:
+            icon_name = fallback_name
         if "wxMSW" in wx.PlatformInfo:
             img = wx.Image('%s/PyHoca/16x16/%s.png' % (_icons_location, icon_name))
         elif "wxGTK" in wx.PlatformInfo:


hooks/post-receive
-- 
pyhoca-gui.git (Python X2Go Client (wxPython GUI))

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "pyhoca-gui.git" (Python X2Go Client (wxPython GUI)).




More information about the x2go-commits mailing list