[X2Go-Commits] pyhoca-gui.git - twofactorauth (branch) updated: 0.1.0.8-3-gcc19221

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


The branch, twofactorauth has been updated
       via  cc192214adcb6af5751bb0641129b241fb4bc28d (commit)
      from  8d6440374e447d16e4c67c8f0673d204c0799d86 (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              |    6 ++---
 pyhoca/wxgui/frontend.py      |   17 +++++++++++++
 pyhoca/wxgui/menus_taskbar.py |   56 ++++++++++++++++++++++++++++++++++++++---
 3 files changed, 73 insertions(+), 6 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 0d7b645..77f727e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
 pyhoca-gui (0.1.0.9-0~x2go1) UNRELEASED; urgency=low
 
-  * New upstream version (0.1.0.8):
-    - continue development...
-  * Depend on python-x2go (>=0.1.1.6).
+  * New upstream version (0.1.0.9):
+    - Add folder unsharing (umount) support.
+  * Depend on python-x2go (>=0.1.1.7).
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 14 Sep 2011 21:49:08 +0200
 
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index 6300b73..0b7a8d4 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -623,6 +623,23 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
             # This returns a Python list of files that were selected.
             self._X2goClient__share_local_folder_with_session(profile_name=self.current_profile_name, folder_name=str(dlg.GetPath()))
 
+    def OnUnshareAllLocalFolders(self, evt):
+        """\
+        STILL UNDOCUMENTED
+
+        """
+        self.current_profile_name = self._eventid_profilenames_map[evt.GetId()]
+        self._X2goClient__unshare_all_local_folders_from_profile(profile_name=self.current_profile_name)
+
+    def OnUnshareLocalFolder(self, evt):
+        """\
+        STILL UNDOCUMENTED
+
+        """
+        self.current_profile_name = self._eventid_profilenames_map[evt.GetId()]
+        _unshare_folder = self._eventid_shared_folders_map[evt.GetId()]
+        self._X2goClient__unshare_local_folder_from_profile(profile_name=self.current_profile_name, local_path=_unshare_folder)
+
     def OnListSessions(self, evt):
         """\
         STILL UNDOCUMENTED
diff --git a/pyhoca/wxgui/menus_taskbar.py b/pyhoca/wxgui/menus_taskbar.py
index f7df009..b0db6fd 100644
--- a/pyhoca/wxgui/menus_taskbar.py
+++ b/pyhoca/wxgui/menus_taskbar.py
@@ -181,6 +181,52 @@ class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
         self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnSessionTerminate, id=ID_TERMINATESESSION)
 
 
+class PyHocaGUI_Menu_TaskbarProfileSharedFolders(wx.Menu):
+    """\
+    STILL UNDOCUMENTED
+
+    """
+    def __init__(self, _PyHocaGUI, caller=None, profile_name=None):
+        """\
+        STILL UNDOCUMENTED
+
+        """
+        self._PyHocaGUI = _PyHocaGUI
+        self._pyhoca_logger = self._PyHocaGUI._pyhoca_logger
+
+        wx.Menu.__init__(self)
+
+        ID_SHARELOCALFOLDER = wx.NewId()
+        ID_UNSHAREALLLOCALFOLDERS = wx.NewId()
+
+        # preparing profile_name information for the main PyHocaGUI instance
+        self._PyHocaGUI._eventid_profilenames_map[ID_SHARELOCALFOLDER] = \
+            self._PyHocaGUI._eventid_profilenames_map[ID_UNSHAREALLLOCALFOLDERS] = profile_name
+
+        _share_folder = self.Append(id=ID_SHARELOCALFOLDER, text=_(u"&Share local folder"))
+
+        self.AppendSeparator()
+        _shared_folders = self._PyHocaGUI._X2goClient__profile_get_shared_folders(profile_name=profile_name)
+
+        if _shared_folders:
+            self._PyHocaGUI._eventid_shared_folders_map={}
+            self.Append(id=wx.NewId(), text=_(u'Unshare:'))
+            for _shared_folder in _shared_folders:
+                ID_THISFOLDER = wx.NewId()
+                _shared_folder_item = self.Append(id=ID_THISFOLDER, text="      %s" % _shared_folder)
+                self._PyHocaGUI._eventid_profilenames_map[ID_THISFOLDER] = profile_name
+                self._PyHocaGUI._eventid_shared_folders_map[ID_THISFOLDER] = _shared_folder
+                self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnUnshareLocalFolder, id=ID_THISFOLDER)
+            self.AppendSeparator()
+
+        _unshare_folders = self.Append(id=ID_UNSHAREALLLOCALFOLDERS, text=_(u"Unshare &all local folders"))
+        if not _shared_folders:
+            _unshare_folders.Enable(False)
+
+        self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnShareLocalFolder, id=ID_SHARELOCALFOLDER)
+        self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnUnshareAllLocalFolders, id=ID_UNSHAREALLLOCALFOLDERS)
+
+
 class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu):
     """\
     STILL UNDOCUMENTED
@@ -200,6 +246,7 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu):
         ID_CLEANSESSIONS = wx.NewId()
         ID_EDITPROFILEWHILECONNECTED = wx.NewId()
         ID_SHARELOCALFOLDER = wx.NewId()
+        ID_UNSHAREFOLDERS = wx.NewId()
         ID_DISCONNECT = wx.NewId()
 
         current_profile_config = self._PyHocaGUI.get_profile_config(profile_name)
@@ -209,6 +256,7 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu):
             self._PyHocaGUI._eventid_profilenames_map[ID_CLEANSESSIONS] = \
             self._PyHocaGUI._eventid_profilenames_map[ID_EDITPROFILEWHILECONNECTED] = \
             self._PyHocaGUI._eventid_profilenames_map[ID_SHARELOCALFOLDER] = \
+            self._PyHocaGUI._eventid_profilenames_map[ID_UNSHAREFOLDERS] = \
             self._PyHocaGUI._eventid_profilenames_map[ID_DISCONNECT] = profile_name
 
         self.Append(id=ID_SESSIONSTART, text=_(u"Start &new Session"))
@@ -245,9 +293,12 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu):
                 self.AppendSeparator()
         self.Append(id=ID_EDITPROFILEWHILECONNECTED, text=_(u"Customize &profile"))
         if current_profile_config['useexports']:
-            _share_folder = self.Append(id=ID_SHARELOCALFOLDER, text=_(u"Share local &folder"))
+            _shared_folders = self.AppendMenu(id=ID_SHARELOCALFOLDER, text=_(u"Shared &folders"),
+                                            submenu=PyHocaGUI_Menu_TaskbarProfileSharedFolders(self._PyHocaGUI, caller=self,
+                                                                                        profile_name=profile_name)
+                                           )
             if not self._PyHocaGUI._X2goClient__client_associated_sessions_of_profile_name(profile_name, return_objects=False):
-                _share_folder.Enable(False)
+                _shared_folders.Enable(False)
 
         self.AppendSeparator()
         self.Append(id=ID_DISCONNECT, text=_(u"&Disconnect from Server"))
@@ -256,7 +307,6 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu):
         self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnSessionStart, id=ID_SESSIONSTART)
         self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnCleanSessions, id=ID_CLEANSESSIONS)
         self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileEditWhileConnected, id=ID_EDITPROFILEWHILECONNECTED)
-        self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnShareLocalFolder, id=ID_SHARELOCALFOLDER)
         self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnServerDisconnect, id=ID_DISCONNECT)
 
 


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