[X2Go-Commits] pyhoca-gui.git - master (branch) updated: 0.4.0.8-27-g6dc9be8

X2Go dev team git-admin at x2go.org
Fri Nov 15 22:43:04 CET 2013


The branch, master has been updated
       via  6dc9be87a26882d6b0a444a8db0f3784e955d02f (commit)
      from  6d25c214b489416960ec64475d5ec7f0fd0ea27d (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 -----------------------------------------------------------------
commit 6dc9be87a26882d6b0a444a8db0f3784e955d02f
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Nov 15 22:42:49 2013 +0100

    Resolve tilde char in session icon names.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog               |    1 +
 pyhoca/wxgui/profilemanager.py |    9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 8b2a5a5..8936bc8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,7 @@ pyhoca-gui (0.4.0.9-0~x2go1) UNRELEASED; urgency=low
     - Resolve tilde char in file path of the about image.
     - Resolve tilde char in file path of the splash image.
     - Resolve tilde char in base directories for the PyHoca-GUI application.
+    - Resolve tilde char in session icon names.
   * /debian/copyright:
     + Update file. Add entry for file icon2exe.py.
   * /debian/control:
diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py
index d73b36d..170fd97 100644
--- a/pyhoca/wxgui/profilemanager.py
+++ b/pyhoca/wxgui/profilemanager.py
@@ -226,12 +226,12 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
             path_to_icon = self.profile_config['icon'].strip()
             path_to_icon = os.path.normpath(path_to_icon)
             self.default_icon = False
-        if not os.path.exists(path_to_icon):
+        if not os.path.exists(os.path.expanduser(path_to_icon)):
             path_to_icon = os.path.normpath('%s/PyHoca/128x128/pyhoca-session.png' % _icons_location)
             self.default_icon = True
         self.IconPath = path_to_icon
         self.IconButtonLabel = wx.StaticText(self.tab_Profile, -1, _(u"Window Icon")+": ")
-        self.IconButton = wx.BitmapButton(self.tab_Profile, -1, wx.Bitmap(path_to_icon, wx.BITMAP_TYPE_ANY), size=wx.Size(136,136), )
+        self.IconButton = wx.BitmapButton(self.tab_Profile, -1, wx.Bitmap(os.path.expanduser(path_to_icon), wx.BITMAP_TYPE_ANY), size=wx.Size(136,136), )
 
         ###
         ### widgets for the SESSION tab
@@ -1296,7 +1296,10 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
             self.profile_config['forwardsshagent'] = False
         self.profile_config['published'] = self.UsePublishedApplications.GetValue()
         if not self.default_icon:
-            self.profile_config['icon'] = self.IconPath
+            _icon = self.IconPath
+            if _icon.startswith(os.environ['HOME']):
+                _icon = _icon.replace(os.environ['HOME'], "~", 1)
+            self.profile_config['icon'] = _icon
         else:
             self.profile_config['icon'] = ':icons/128x128/x2gosession.png'
         self.profile_config['user'] = self.UserName.GetValue()


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