[X2Go-Commits] pyhoca-gui.git - build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d (branch) updated: 0.1.0.10-32-gceed708

X2Go dev team git-admin at x2go.org
Tue Aug 27 13:21:56 CEST 2013


The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
       via  ceed708ca6d5cf0e2a52eab928ccc7095e446be3 (commit)
      from  b160973ba782315e03cf3ca121ab6d44a3e854ad (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               |    3 ++-
 pyhoca/wxgui/profilemanager.py |   57 +++++++++++++++++++++++++++++-----------
 2 files changed, 44 insertions(+), 16 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 7bbac1c..aa70e27 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,9 @@ pyhoca-gui (0.1.0.11-0~x2go1) UNRELEASED; urgency=low
   * New upstream version (0.1.0.11):
     - Add XFCE4 support.
     - Add support for renaming session window titles from the client-side.
-    - Add switch that enables/disablee custom/server-side session window
+    - Add switch that enables/disables custom/server-side session window
       titles.
+    - Add switch that enables/disables default/custom session window title.
     - Update of i18n files: en, de, es.
     - Drop handling of session icon, not used in pyhoca-gui, anyway.
     - Fix profile manager window size (shrinking for usage on netbooks).
diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py
index 01c939f..d2a3388 100644
--- a/pyhoca/wxgui/profilemanager.py
+++ b/pyhoca/wxgui/profilemanager.py
@@ -169,9 +169,10 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
         #self.IconPath = path_to_icon
         #self.IconButtonLabel = wx.StaticText(self.tab_Session, -1, _(u"Icon")+':')
         #self.IconButton = wx.BitmapButton(self.tab_Session, -1, wx.Bitmap(path_to_icon, wx.BITMAP_TYPE_ANY), size=(48,48))
-        self.SetSessionWindowTitle = wx.CheckBox(self.tab_Session, -1, _(u"Set session window title (leave field below empty for default title from server)")+':')
-        self.SessionWindowTitleLabel = wx.StaticText(self.tab_Session, -1, _(u"Session window title")+":")
-        self.SessionWindowTitle = wx.TextCtrl(self.tab_Session, -1, "")
+        self.SetSessionWindowTitle = wx.CheckBox(self.tab_Session, -1, _(u"Set session window title"))
+        self.UseDefaultSessionWindowTitle = wx.CheckBox(self.tab_Session, -1, _(u"Use a default session window title"))
+        self.CustomSessionWindowTitleLabel = wx.StaticText(self.tab_Session, -1, _(u"Custom session window title") + ":")
+        self.CustomSessionWindowTitle = wx.TextCtrl(self.tab_Session, -1, "")
         self.SessionTypeLabel = wx.StaticText(self.tab_Session, -1, _(u"Type")+':')
         self.SessionType = wx.ComboBox(self.tab_Session, -1, choices=self.sessionChoices.values(), style=wx.CB_DROPDOWN|wx.CB_READONLY)
         self.ApplicationLabel = wx.StaticText(self.tab_Session, -1, _(u"Application")+':')
@@ -292,6 +293,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
 
         #self.Bind(wx.EVT_BUTTON, self.OnIconChange, self.IconButton)
         self.Bind(wx.EVT_COMBOBOX, self.OnSessionTypeSelected, self.SessionType)
+        self.Bind(wx.EVT_CHECKBOX, self.OnUseDefaultSessionWindowTitle, self.UseDefaultSessionWindowTitle)
         self.Bind(wx.EVT_CHECKBOX, self.OnSetSessionWindowTitle, self.SetSessionWindowTitle)
         self.Bind(wx.EVT_BUTTON, self.OnSSHKeyFileBrowse, self.SSHKeyFileBrowseButton)
         self.Bind(wx.EVT_BUTTON, self.OnSSHProxyKeyFileBrowse, self.SSHProxyKeyFileBrowseButton)
@@ -342,8 +344,9 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
         self.ProfileNameLabel.SetMinSize((160, 16))
         self.ProfileName.SetMinSize((320, _textfield_height))
         self.SetSessionWindowTitle.SetMinSize((-1, _textfield_height))
-        self.SessionWindowTitleLabel.SetMinSize((160, 16))
-        self.SessionWindowTitle.SetMinSize((320, _textfield_height))
+        self.UseDefaultSessionWindowTitle.SetMinSize((-1, _textfield_height))
+        self.CustomSessionWindowTitleLabel.SetMinSize((160, 16))
+        self.CustomSessionWindowTitle.SetMinSize((320, _textfield_height))
         #self.IconButton.SetSize(self.IconButton.GetBestSize())
         self.SessionTypeLabel.SetMinSize((120, 16))
         self.SessionType.SetMinSize((-1, _textfield_height))
@@ -435,9 +438,11 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
         #sizer_1_1_1.Add(self.IconButton)
         sizer_1_1_2 = wx.BoxSizer(wx.HORIZONTAL)
         sizer_1_1_2.Add(self.SetSessionWindowTitle)
+        sizer_1_1_2.Add((32,0))
+        sizer_1_1_2.Add(self.UseDefaultSessionWindowTitle)
         sizer_1_1_3 = wx.FlexGridSizer(1, 2, 7, 9)
-        sizer_1_1_3.Add(self.SessionWindowTitleLabel, flag=wx.ALIGN_CENTRE_VERTICAL)
-        sizer_1_1_3.Add(self.SessionWindowTitle)
+        sizer_1_1_3.Add(self.CustomSessionWindowTitleLabel, flag=wx.ALIGN_CENTRE_VERTICAL)
+        sizer_1_1_3.Add(self.CustomSessionWindowTitle)
 
         sizer_1_1.Add(sizer_1_1_1, flag=wx.EXPAND|wx.ALL, border=7)
         sizer_1_1.Add(sizer_1_1_2, flag=wx.EXPAND|wx.ALL, border=7)
@@ -726,11 +731,19 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
     def __update_fields(self):
 
         self.ProfileName.SetValue(self.profile_config['name'])
-        self.SessionWindowTitle.SetValue(self.profile_config['sessiontitle'])
         self.SetSessionWindowTitle.SetValue(self.profile_config['setsessiontitle'])
+        self.CustomSessionWindowTitle.SetValue(self.profile_config['sessiontitle'])
         if not self.profile_config['setsessiontitle']:
-            self.SessionWindowTitleLabel.Enable(False)
-            self.SessionWindowTitle.Enable(False)
+            self.CustomSessionWindowTitleLabel.Enable(False)
+            self.CustomSessionWindowTitle.Enable(False)
+            self.UseDefaultSessionWindowTitle.Enable(False)
+        else:
+            if self.profile_config['sessiontitle']:
+                self.UseDefaultSessionWindowTitle.SetValue(False)
+            else:
+                self.UseDefaultSessionWindowTitle.SetValue(True)
+                self.CustomSessionWindowTitleLabel.Enable(False)
+                self.CustomSessionWindowTitle.Enable(False)
         self.Host.SetValue(self.profile_config['host'])
         self.UserName.SetValue(self.profile_config['user'])
         self.SSHPort.SetValue(self.profile_config['sshport'])
@@ -1017,7 +1030,10 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
     def __update_from_screen(self):
         self.profile_config['name'] = self.ProfileName.GetValue()
         self.profile_config['setsessiontitle'] = self.SetSessionWindowTitle.GetValue()
-        self.profile_config['sessiontitle'] = self.SessionWindowTitle.GetValue()
+        if self.UseDefaultSessionWindowTitle.GetValue():
+            self.profile_config['sessiontitle'] = ''
+        else:
+            self.profile_config['sessiontitle'] = self.CustomSessionWindowTitle.GetValue()
         #self.profile_config['icon'] = self.IconPath
         self.profile_config['user'] = self.UserName.GetValue()
         self.profile_config['key'] = self.SSHKeyFile.GetValue()
@@ -1146,11 +1162,22 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
 
     def OnSetSessionWindowTitle(self, event):
         if self.SetSessionWindowTitle.GetValue():
-            self.SessionWindowTitleLabel.Enable(True)
-            self.SessionWindowTitle.Enable(True)
+            self.UseDefaultSessionWindowTitle.Enable(True)
+            if not self.UseDefaultSessionWindowTitle.GetValue():
+                self.CustomSessionWindowTitleLabel.Enable(True)
+                self.CustomSessionWindowTitle.Enable(True)
+        else:
+            self.UseDefaultSessionWindowTitle.Enable(False)
+            self.CustomSessionWindowTitleLabel.Enable(False)
+            self.CustomSessionWindowTitle.Enable(False)
+
+    def OnUseDefaultSessionWindowTitle(self, event):
+        if self.UseDefaultSessionWindowTitle.GetValue():
+            self.CustomSessionWindowTitleLabel.Enable(False)
+            self.CustomSessionWindowTitle.Enable(False)
         else:
-            self.SessionWindowTitleLabel.Enable(False)
-            self.SessionWindowTitle.Enable(False)
+            self.CustomSessionWindowTitleLabel.Enable(True)
+            self.CustomSessionWindowTitle.Enable(True)
 
     def enable_DirectRDP(self):
         self.HostLabel.Enable(False)


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