[X2Go-Commits] pyhoca-gui.git - twofactorauth (branch) updated: 7d97ffdd38be4168995fbf6ec7f6bf7daa728340

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


The branch, twofactorauth has been updated
       via  7d97ffdd38be4168995fbf6ec7f6bf7daa728340 (commit)
      from  82f0f4663240c63df35459d122444b40d20c1d15 (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/frontend.py       |    2 +-
 pyhoca/wxgui/menus_taskbar.py  |   17 ++++++++++-------
 pyhoca/wxgui/profilemanager.py |   16 ++++++----------
 3 files changed, 17 insertions(+), 18 deletions(-)

The diff of changes is:
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index 41ce849..0912e84 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -427,7 +427,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
 
         """
         self._pyhoca_logger('adding new X2go session profile', loglevel=x2go.log.loglevel_INFO, )
-        profilemanager.PyHocaGUI_ProfileManager(self, 'ADD')
+        profilemanager.PyHocaGUI_ProfileManager(self, 'ADD', profile_name='New Session Profile')
 
     def OnProfileEdit(self, evt):
         """\
diff --git a/pyhoca/wxgui/menus_taskbar.py b/pyhoca/wxgui/menus_taskbar.py
index 43617a5..b6655ad 100644
--- a/pyhoca/wxgui/menus_taskbar.py
+++ b/pyhoca/wxgui/menus_taskbar.py
@@ -76,23 +76,19 @@ class PyHocaGUI_Menu_TaskbarOptionsManager(wx.Menu):
 
         self.AppendSeparator()
 
-        ID_ADDPROFILE = wx.NewId()
         ID_PROFILEMANAGER = wx.NewId()
-        _add_profile_item = self.Append(id=ID_ADDPROFILE, text="Add new X2go Session Profile")
-        self.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileAdd, id=ID_ADDPROFILE)
         _maintain_profiles_item = self.AppendMenu(id=ID_PROFILEMANAGER, 
-                        text="Maintain X2go Session Profiles", 
+                        text="Profile Manager", 
                         submenu=PyHocaGUI_Menu_TaskbarProfileNames(self._PyHocaGUI, 
                                                                    caller=self,
                                                                    submenu=PyHocaGUI_Menu_TaskbarManageProfile))
         if self._PyHocaGUI.profilemanager_disabled:
-            _add_profile_item.Enable(False)
             _maintain_profiles_item.Enable(False)
 
         self.AppendSeparator()
 
         ID_OPTIONS = wx.NewId()
-        _options_item = self.Append(id=ID_OPTIONS, text="X2go Client Options")
+        _options_item = self.Append(id=ID_OPTIONS, text="Client Options")
         self.Bind(wx.EVT_MENU, self._PyHocaGUI.OnOptions, id=ID_OPTIONS)
         if self._PyHocaGUI.options_disabled:
             _options_item.Enable(False)
@@ -104,7 +100,6 @@ class PyHocaGUI_Menu_TaskbarOptionsManager(wx.Menu):
         self.Bind(wx.EVT_MENU, self._PyHocaGUI.OnTaskbarExit, id=ID_EXIT)
 
 
-
 class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
     """\
     STILL UNDOCUMENTED
@@ -218,8 +213,16 @@ class PyHocaGUI_Menu_TaskbarProfileNames(wx.Menu):
         self._PyHocaGUI = _PyHocaGUI
         self._pyhoca_logger = self._PyHocaGUI._pyhoca_logger
 
+
         wx.Menu.__init__(self)
 
+        if type(caller) == PyHocaGUI_Menu_TaskbarOptionsManager:
+            ID_ADDPROFILE = wx.NewId()
+            self.Append(id=ID_ADDPROFILE, text="Add Profile")
+            self.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileAdd, id=ID_ADDPROFILE)
+
+            self.AppendSeparator()
+
         _profile_names = self._PyHocaGUI.session_profiles.profile_names
         _profile_names.sort()
         if filter_profiles:
diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py
index 43243fd..35c06f5 100644
--- a/pyhoca/wxgui/profilemanager.py
+++ b/pyhoca/wxgui/profilemanager.py
@@ -53,14 +53,15 @@ class PyHocaGUI_ProfileManager(wx.Frame):
         self.session_profiles = self._PyHocaGUI.session_profiles
         self.action = action
 
-        if profile_id is not None:
-            self.profile_id = profile_id
-        elif profile_name is not None:
-            self.profile_id = self.session_profiles.check_profile_id_or_name(profile_name)
+        if self.action == 'EDIT':
+            if profile_id is not None:
+                self.profile_id = profile_id
+            elif profile_name is not None:
+                self.profile_id = self.session_profiles.check_profile_id_or_name(profile_name)
 
         if self.action == 'ADD':
             # this will create a default session profile
-            self.profile_id = self.session_profiles.add_profile(self.profile_id)
+            self.profile_id = self.session_profiles.add_profile()
 
         self.profile_config = self.session_profiles.get_profile_config(self.profile_id)
 
@@ -95,8 +96,6 @@ class PyHocaGUI_ProfileManager(wx.Frame):
         self.hostname = wx.TextCtrl(self.X2goSessionTab, -1, "", size=wx.Size(200,20))
         self.UserLabel = wx.StaticText(self.X2goSessionTab, -1, "User:")
         self.username = wx.TextCtrl(self.X2goSessionTab, -1, "", size=wx.Size(200,20))
-        self.DefaultLabel = wx.StaticText(self.X2goSessionTab, -1, "Is defaultprofile:")
-        self.Default = wx.CheckBox(self.X2goSessionTab, -1, "")
         self.LoginLabel = wx.StaticText(self.X2goConnectionTab, -1, "Login")
         self.sshport = wx.SpinCtrl(self.X2goConnectionTab, -1, "0", min=22, max=64000)
         self.SSHkeyLabel = wx.StaticText(self.X2goConnectionTab, -1, "RSA/DSA key")
@@ -228,7 +227,6 @@ class PyHocaGUI_ProfileManager(wx.Frame):
         self.ProfileName.SetValue(self.profile_config['name'])
         self.hostname.SetValue(self.profile_config['host'])
         self.username.SetValue(self.profile_config['user'])
-        self.Default.SetValue(self.profile_config['default'])
         self.sshport.SetValue(self.profile_config['sshport'])
         self.sshkeylocation.SetLabel(self.profile_config['key'])
 
@@ -391,8 +389,6 @@ class PyHocaGUI_ProfileManager(wx.Frame):
         grid_sizer_1.Add(self.hostname, 0, wx.FIXED_MINSIZE, 0)
         grid_sizer_1.Add(self.UserLabel, 0, 0, 0)
         grid_sizer_1.Add(self.username, 0, wx.FIXED_MINSIZE, 0)
-        grid_sizer_1.Add(self.DefaultLabel, 0, 0, 0)
-        grid_sizer_1.Add(self.Default, 0, 0, 0)
         self.X2goSessionTab.SetSizer(grid_sizer_1)
         grid_sizer_1.AddGrowableCol(0)
         grid_sizer_1.AddGrowableCol(1)


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