[X2Go-Commits] pyhoca-gui.git - build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d (branch) updated: 0.2.0.4-114-gc037703

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


The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
       via  c0377039208d2527f0c037b8576dd39b387fb378 (commit)
      from  bc3bb9dab6e47c904b52ea9c9e9dec32c821b944 (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               |    4 ++++
 pyhoca/wxgui/frontend.py       |    5 +++++
 pyhoca/wxgui/menus_taskbar.py  |    4 ++--
 pyhoca/wxgui/profilemanager.py |   11 +++++++++++
 4 files changed, 22 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 236efaa..34a3503 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -49,6 +49,10 @@ pyhoca-gui (0.2.1.0-0~x2go1) UNRELEASED; urgency=low
       resumption / re-start. Sponsored by Dick Kniep, LinDix NL.
     - Hide the file sharing submenu if the master session's submenu is currently
       disabled due to some current action and an expected session status change.
+    - If the profile manager is open for a certain session profile, disable
+      all menu items that relate to this session profile. Re-enable the menu
+      items again, once the corresponding profile manager window has been
+      closed.
   * /debian/control:
     + Maintainer change in package: X2Go Developers
       <x2go-dev at lists.berlios.de>.
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index a86fa31..b52659e 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -1003,6 +1003,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
 
         """
         profile_name = self._eventid_profilenames_map[evt.GetId()]
+        self._temp_disabled_profile_names.append(profile_name)
         self._pyhoca_logger('editing session profile %s' % profile_name, loglevel=x2go.log.loglevel_INFO, )
         if self.args.single_session_profile:
             _edit_action = "EDIT_EXPLICITLY"
@@ -1019,6 +1020,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
 
         """
         profile_name = self._eventid_profilenames_map[evt.GetId()]
+        self._temp_disabled_profile_names.append(profile_name)
         self._pyhoca_logger('using session profile %s as template for new profile' % profile_name, loglevel=x2go.log.loglevel_INFO, )
         profilemanager.PyHocaGUI_ProfileManager(self, 'COPY', profile_name=profile_name)
 
@@ -1031,6 +1033,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
 
         """
         profile_name = self._eventid_profilenames_map[evt.GetId()]
+        self._temp_disabled_profile_names.append(profile_name)
         self._pyhoca_logger('editing session profile %s' % profile_name, loglevel=x2go.log.loglevel_INFO, )
         profilemanager.PyHocaGUI_ProfileManager(self, 'EDIT_CONNECTED', profile_name=profile_name)
 
@@ -1043,6 +1046,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
 
         """
         profile_name = self._eventid_profilenames_map[evt.GetId()]
+        self._temp_disabled_profile_names.append(profile_name)
 
         m = messages.PyHoca_MessageWindow_NoYes(self, shortmsg='REALLY_DELETE_PROFILE', title=_(u'Really Delete Session Profile ,,%s\'\'?') % profile_name, icon='question', profile_name=profile_name)
         m.ShowModal()
@@ -1053,6 +1057,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
                 self.notifier.send(title=_(u'%s - profile deleted') % profile_name, text=_(u'The session profile has been deleted.'), icon='profile_delete')
             except:
                 pass
+        self._temp_disabled_profile_names.remove(profile_name)
 
     def OnShareCustomLocalFolder(self, evt):
         """\
diff --git a/pyhoca/wxgui/menus_taskbar.py b/pyhoca/wxgui/menus_taskbar.py
index 97b56cd..8fb35ab 100644
--- a/pyhoca/wxgui/menus_taskbar.py
+++ b/pyhoca/wxgui/menus_taskbar.py
@@ -118,7 +118,7 @@ class PyHocaGUI_Menu_TaskbarOptionsManager(wx.Menu):
                                                           submenu=PyHocaGUI_Menu_TaskbarProfileNames(self._PyHocaGUI,
                                                                                                      caller=self,
                                                                                                      filter_profiles=[],
-                                                                                                     disabled_profiles=self._PyHocaGUI.client_connected_profiles(return_profile_names=True),
+                                                                                                     disabled_profiles=self._PyHocaGUI.client_connected_profiles(return_profile_names=True) + self._PyHocaGUI._temp_disabled_profile_names,
                                                                                                      submenu=PyHocaGUI_Menu_TaskbarManageProfile,
                                                                                                      group_menus=True,
                                                                                                     )
@@ -948,7 +948,7 @@ class PyHocaGUI_Menu_TaskbarSessionManager(wx.Menu):
                         submenu=PyHocaGUI_Menu_TaskbarProfileNames(self._PyHocaGUI, 
                                                                    caller=self,
                                                                    filter_profiles=[],
-                                                                   disabled_profiles=self._PyHocaGUI.client_connected_sessions(return_profile_names=True),
+                                                                   disabled_profiles=self._PyHocaGUI.client_connected_profiles(return_profile_names=True) + self._PyHocaGUI._temp_disabled_profile_names,
                                                                    bind_method=self._PyHocaGUI.OnSessionAuthenticate))
         self.AppendSeparator()
 
diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py
index 32ffcda..0d3dde5 100644
--- a/pyhoca/wxgui/profilemanager.py
+++ b/pyhoca/wxgui/profilemanager.py
@@ -2432,6 +2432,17 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
         self.profile_config = copy.deepcopy(self.profile_config_bak)
         self.__update_fields()
 
+    def Close(self):
+        """\
+        Clean-up disabled profile_names when closing the profile manager dialog.
+
+        """
+        try:
+            self._PyHocaGUI._temp_disabled_profile_names.remove(self.profile_name)
+        except ValueError:
+            pass
+        wx.Dialog.Close(self)
+
     def Destroy(self):
         """\
         Tidy up some stuff in the main application instance before allowing desctruction of the


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