[X2Go-Commits] pyhoca-gui.git - build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d (branch) updated: 0.1.0.10-27-gfe1d6d3

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


The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
       via  fe1d6d33fcefe8229db11150fe753ac604f2a6a7 (commit)
      from  dc9491b2b16a1e87c3e25fabe91fea4043043f34 (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              |    2 ++
 pyhoca/wxgui/frontend.py      |    6 ++++++
 pyhoca/wxgui/menus_taskbar.py |   21 +++++++++++++++------
 3 files changed, 23 insertions(+), 6 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index a1e5925..7bbac1c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ pyhoca-gui (0.1.0.11-0~x2go1) UNRELEASED; urgency=low
     - Add extra session menu titem: Rename Session Window.
     - Show desktop session name in menu for ,,start session'' item.
     - Show session window title in session menu.
+    - Add support for bringing a session window on top of all other 
+      windows (i.e. to foreground).
   * Depend on Python X2Go 0.1.1.9.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 09 Nov 2011 03:13:09 +0100
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index 6e3daa3..4e99184 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -703,6 +703,12 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
         session_name = self._eventid_sessionnames_map[evt.GetId()]
         sessiontitle.PyHocaGUI_DialogBoxSessionTitle(self, profile_name, session_name)
 
+    def OnSessionFocus(self, evt):
+        profile_name = self._eventid_profilenames_map[evt.GetId()]
+        session_name = self._eventid_sessionnames_map[evt.GetId()]
+        _s = self._X2goClient__get_session_of_session_name(session_name, return_object=True)
+        _s.raise_session_window()
+
     def OnAbout(self, evt):
         """\
         STILL UNDOCUMENTED
diff --git a/pyhoca/wxgui/menus_taskbar.py b/pyhoca/wxgui/menus_taskbar.py
index 119ecfe..f4bc180 100644
--- a/pyhoca/wxgui/menus_taskbar.py
+++ b/pyhoca/wxgui/menus_taskbar.py
@@ -137,6 +137,7 @@ class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
 
         wx.Menu.__init__(self)
 
+        ID_RAISESESSION = wx.NewId()
         ID_RENAMESESSION = wx.NewId()
         ID_TRANSFERSESSION = wx.NewId()
         ID_TRANSFERSESSION_DISABLED = wx.NewId()
@@ -146,14 +147,16 @@ class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
         ID_TERMINATESESSION = wx.NewId()
 
         # preparing profile_name information for the main PyHocaGUI instance
-        self._PyHocaGUI._eventid_profilenames_map[ID_RENAMESESSION] = \
+        self._PyHocaGUI._eventid_profilenames_map[ID_RAISESESSION] = \
+            self._PyHocaGUI._eventid_profilenames_map[ID_RENAMESESSION] = \
             self._PyHocaGUI._eventid_profilenames_map[ID_TRANSFERSESSION] = \
             self._PyHocaGUI._eventid_profilenames_map[ID_RESUMESESSION] = \
             self._PyHocaGUI._eventid_profilenames_map[ID_SUSPENDSESSION] = \
             self._PyHocaGUI._eventid_profilenames_map[ID_TERMINATESESSION] = profile_name
 
         # preparing session_name information for the main PyHocaGUI instance
-        self._PyHocaGUI._eventid_sessionnames_map[ID_RENAMESESSION] = \
+        self._PyHocaGUI._eventid_sessionnames_map[ID_RAISESESSION] = \
+            self._PyHocaGUI._eventid_sessionnames_map[ID_RENAMESESSION] = \
             self._PyHocaGUI._eventid_sessionnames_map[ID_TRANSFERSESSION] = \
             self._PyHocaGUI._eventid_sessionnames_map[ID_RESUMESESSION] = \
             self._PyHocaGUI._eventid_sessionnames_map[ID_SUSPENDSESSION] = \
@@ -163,10 +166,7 @@ class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
 
         if _s.get_session_cmd() in x2go.defaults.X2GO_DESKTOPSESSIONS and status == 'R':
 
-            _title = self.Append(text=_s.get_session_title(), id=wx.NewId())
-            _title.Enable(False)
-            self.AppendSeparator()
-            _rens = self.Append(text=_("Rename Session Window"), id=ID_RENAMESESSION)
+            _title = self.Append(text=_("Window title") + ": " + _s.get_session_title(), id=wx.NewId())
             self.AppendSeparator()
 
         if status == 'S':
@@ -189,8 +189,17 @@ class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
 
             self.Append(text=_(u"Suspend Session"), id=ID_SUSPENDSESSION)
 
+
         self.Append(text=_(u"Terminate Session"), id=ID_TERMINATESESSION)
 
+        if _s.get_session_cmd() in x2go.defaults.X2GO_DESKTOPSESSIONS and status == 'R':
+
+            self.AppendSeparator()
+            self.Append(text=_("Bring to Foreground"), id=ID_RAISESESSION)
+
+            self.Append(text=_("Rename Session Window"), id=ID_RENAMESESSION)
+
+        self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnSessionFocus, id=ID_RAISESESSION)
         self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnSessionRename, id=ID_RENAMESESSION)
         self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnSessionResume, id=ID_RESUMESESSION)
         self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnSessionResume, id=ID_TRANSFERSESSION)


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