[X2go-Commits] pyhoca-gui.git - master (branch) updated: 0.1.0.6-30-gcc19221

X2go dev team git-admin at x2go.org
Sat Sep 17 02:11:59 CEST 2011


The branch, master has been updated
       via  cc192214adcb6af5751bb0641129b241fb4bc28d (commit)
       via  8d6440374e447d16e4c67c8f0673d204c0799d86 (commit)
       via  d64c7ff36168a18570c68ceb8d8e47f2dbfebc1b (commit)
      from  d7cc74265b286d65c55273f1312c04748d09c5be (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 -----------------------------------------------------------------
commit cc192214adcb6af5751bb0641129b241fb4bc28d
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sat Sep 17 02:11:53 2011 +0200

    Add folder unsharing (umount) support.

commit 8d6440374e447d16e4c67c8f0673d204c0799d86
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Sep 14 21:54:33 2011 +0200

    Depend on python-x2go (>=0.1.1.6).

commit d64c7ff36168a18570c68ceb8d8e47f2dbfebc1b
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Sep 14 21:49:47 2011 +0200

    version increment

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog              |    8 ++++++
 debian/control                |    2 +-
 pyhoca/wxgui/__init__.py      |    2 +-
 pyhoca/wxgui/frontend.py      |   17 ++++++++++++
 pyhoca/wxgui/menus_taskbar.py |   56 ++++++++++++++++++++++++++++++++++++++--
 5 files changed, 80 insertions(+), 5 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index dd30ded..77f727e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pyhoca-gui (0.1.0.9-0~x2go1) UNRELEASED; urgency=low
+
+  * 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
+
 pyhoca-gui (0.1.0.8-0~x2go1) unstable; urgency=low
 
   * New upstream version (0.1.0.8):
diff --git a/debian/control b/debian/control
index 1960956..a32606b 100644
--- a/debian/control
+++ b/debian/control
@@ -27,7 +27,7 @@ Architecture: all
 Depends: 
  ${misc:Depends},
  python,
- python-x2go (>=0.1.1.5-0~),
+ python-x2go (>=0.1.1.6-0~),
  python-argparse,
  python-notify,
  python-setproctitle,
diff --git a/pyhoca/wxgui/__init__.py b/pyhoca/wxgui/__init__.py
index 10c3e7a..64b0747 100644
--- a/pyhoca/wxgui/__init__.py
+++ b/pyhoca/wxgui/__init__.py
@@ -18,6 +18,6 @@
 # Free Software Foundation, Inc.,
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
-__VERSION__ = '0.1.0.8'
+__VERSION__ = '0.1.0.9'
 
 from frontend import *
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