[X2Go-Commits] pyhoca-gui.git - build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d (branch) updated: 0.2.1.1-55-gda10c3f

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


The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
       via  da10c3f29e2ccd66841fa53c99dfe7f6ef9d196f (commit)
      from  24209b1fba93f57b12ceca86ecc03c8eaaf03285 (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:
 pyhoca/wxgui/profilemanager.py |   29 +++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

The diff of changes is:
diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py
index 61b939b..31c8d9a 100644
--- a/pyhoca/wxgui/profilemanager.py
+++ b/pyhoca/wxgui/profilemanager.py
@@ -171,6 +171,8 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
         self._last_rdpclient = self.profile_config['rdpclient']
         self._last_application = self.applicationChoices['TERMINAL']
 
+        self.config_saved = False
+
         self.X2GoTabs = wx.Notebook(self, -1, style=0)
         self.tab_Profile = wx.Panel(self.X2GoTabs, -1)
         self.tab_Session = wx.Panel(self.X2GoTabs, -1)
@@ -358,6 +360,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
             self.OKButton = wx.Button(self, -1, _(u"Save"))
             self.DefaultButton = wx.Button(self, -1, _(u'Reset'))
         self.OKButton.SetDefault()
+        self.ApplyButton = wx.Button(self, -1, _(u"Apply"))
         self.CancelButton = wx.Button(self, -1, _(u"Cancel"))
 
         self.__set_properties()
@@ -401,6 +404,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
         self.Bind(wx.EVT_CHECKBOX, self.OnToggleLocalFolderSharing, self.UseLocalFolderSharing)
         self.Bind(wx.EVT_CHECKBOX, self.OnToggleFileMIMEbox, self.UseFileMIMEbox)
         self.Bind(wx.EVT_BUTTON, self.OnOKButton, self.OKButton)
+        self.Bind(wx.EVT_BUTTON, self.OnApplyButton, self.ApplyButton)
         self.Bind(wx.EVT_BUTTON, self.OnCancel, self.CancelButton)
         self.Bind(wx.EVT_BUTTON, self.OnDefault, self.DefaultButton)
 
@@ -513,6 +517,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
         self.FileMIMEboxExtensions.SetMinSize((_field_width, self._textfield_height))
 
         self.OKButton.SetMinSize((-1, 30))
+        self.ApplyButton.SetMinSize((-1, 30))
         self.CancelButton.SetMinSize((-1, 30))
         self.DefaultButton.SetMinSize((-1, 30))
 
@@ -795,8 +800,9 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
 
         # the bottom area with OK, Defaults and Cancel buttons
         sizer_B = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_B_1 = wx.GridSizer(1, 3, 7, 14)
+        sizer_B_1 = wx.GridSizer(1, 4, 7, 14)
         sizer_B_1.Add(self.OKButton)
+        sizer_B_1.Add(self.ApplyButton)
         sizer_B_1.Add(self.DefaultButton)
         sizer_B_1.Add(self.CancelButton)
         sizer_B.Add(sizer_B_1, proportion=1, flag=wx.EXPAND|wx.ALL, border=5)
@@ -2375,9 +2381,9 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
             self._PyHocaGUI.notifier.send(title=_(u'Profile Manager'), text=_(u'Profile name %s already exists!!!') % self.profile_config['name'].strip(), icon='profile_error')
         return validateOk
 
-    def OnOKButton(self, event):
+    def OnApplyButton(self, event):
         """\
-        Gets called if the users clicks on the ,,Save'' button.
+        Gets called if the users clicks on the ,,Apply'' button.
 
         @param event: event
         @type event: C{obj}
@@ -2412,10 +2418,25 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
 
             try: wx.EndBusyCursor()
             except: pass
-            self.Close()
+
+            self.config_saved = True
+            self.profile_config_orig = copy.deepcopy(self.profile_config)
+            self.profile_config_bak = copy.deepcopy(self.profile_config)
         else:
             try: wx.EndBusyCursor()
             except: pass
+            self.config_saved = False
+
+    def OnOKButton(self, event):
+        """\
+        Gets called if the users clicks on the ,,Save'' button.
+
+        @param event: event
+        @type event: C{obj}
+
+        """
+        self.OnApplyButton(event)
+        if self.config_saved: self.Close()
 
     def OnCancel(self, event):
         """\


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