[X2Go-Commits] [pyhoca-gui] 18/18: Allow appname based mini icons on About... windows.

git-admin at x2go.org git-admin at x2go.org
Fri Feb 7 13:26:26 CET 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch brokerclient
in repository pyhoca-gui.

commit 47ea8d71ce05da9ceb5af47968429f33a916799e
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Feb 7 12:32:18 2014 +0100

    Allow appname based mini icons on About... windows.
---
 debian/changelog      |    1 +
 pyhoca/wxgui/about.py |    9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3362e86..7b64f8b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,7 @@ pyhoca-gui (0.5.0.0-0x2go1) UNRELEASED; urgency=low
   * Install more modules into setup.exe: hmac (for ecdsa).
   * NSIS script: empty installation destination before installing new files
     into $INSTDIR.
+  * Allow appname based mini icons on About... windows.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 08 Jan 2014 21:28:37 +0100
 
diff --git a/pyhoca/wxgui/about.py b/pyhoca/wxgui/about.py
index 7e41e96..5c0e6b8 100644
--- a/pyhoca/wxgui/about.py
+++ b/pyhoca/wxgui/about.py
@@ -46,7 +46,7 @@ class PyHocaGUI_AboutFrame(wx.Frame):
     wxWidget displaying an ,,About'' window for this application.
 
     """
-    def __init__(self, _PyHocaGUI, caller=None, about_image=None, icon_name='pyhoca-gui_winicon', about_what=None, ):
+    def __init__(self, _PyHocaGUI, caller=None, about_image=None, icon_name=None, about_what=None, ):
         """\
         About window (constructor).
 
@@ -108,16 +108,19 @@ class PyHocaGUI_AboutFrame(wx.Frame):
         elif "wxMAC" in wx.PlatformInfo:
             icon_size = '128x128'
 
+        if icon_name is None:
+            icon_name = '{appname}_winicon.png'.format(appname=_PyHocaGUI.appname)
+
         icon_name = os.path.expanduser(icon_name)
         if not icon_name.lower().endswith('.png'):
             icon_name = '%s.png' % icon_name
 
         icon_file = icon_name
         if not (os.path.isfile(str(icon_file)) or os.path.islink(str(icon_file))):
-            icon_file = '%s/PyHoca/%s/%s' % (basepath.icons_basepath, icon_size, icon_name)
+            icon_file = '%s/%s/%s/%s' % (basepath.icons_basepath, _PyHocaGUI.appname, icon_size, icon_name)
 
         if not (os.path.isfile(str(icon_file)) or os.path.islink(str(icon_file))):
-            icon_file = os.path.normpath('%s/PyHoca/%s/%s.png' % (basepath.icons_basepath, icon_size, 'pyhoca-winicon'))
+            icon_file = os.path.normpath('%s/PyHoca/%s/%s' % (basepath.icons_basepath, icon_size, 'pyhoca-gui_winicon.png'))
 
         img = wx.Image(icon_file)
         icon = wx.IconFromBitmap(img.ConvertToBitmap())

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git



More information about the x2go-commits mailing list