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

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


The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
       via  9da6af7cadedd6dcc7724ee0ba3ce8d05651df1f (commit)
      from  cd9ab4da648a31e5e86fbf79002ebd39d0c73bdd (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      |    4 ++--
 pyhoca/wxgui/menus_taskbar.py |   16 ++++++++--------
 3 files changed, 12 insertions(+), 10 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 763d46c..097cbd3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -117,6 +117,8 @@ pyhoca-gui (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
     - Catch and notify command startup failures for published applications
       sessions.
     - Do not suspend session if profile is disconnected.
+    - Non-interactive application runs only disconnect/exit for associated
+      sessions.
   * Depend on Python X2Go 0.1.2.0.
   * Install GNOME icons via dh_links.
   * Install X2Go icons with explicit install paths.
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index 250e9ec..8d9798d 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -692,7 +692,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
         self._disable_session_name(profile_name, session_name)
         gevent.spawn(self._X2goClient__suspend_session, session_uuid, session_name=session_name)
         self._eventid_sessionnames_map = {}
-        if self.disconnect_on_suspend:
+        if self.disconnect_on_suspend and self.get_session(session_uuid).has_terminal_session():
             self.OnServerDisconnect(evt)
 
     def OnSessionTerminate(self, evt):
@@ -706,7 +706,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
         self._disable_session_name(profile_name, session_name)
         gevent.spawn(self._X2goClient__terminate_session, session_uuid, session_name=session_name)
         self._eventid_sessionnames_map = {}
-        if self.disconnect_on_terminate:
+        if self.disconnect_on_terminate and self.get_session(session_uuid).has_terminal_session():
             self.OnServerDisconnect(evt)
 
     def OnCleanSessions(self, evt):
diff --git a/pyhoca/wxgui/menus_taskbar.py b/pyhoca/wxgui/menus_taskbar.py
index f1669b8..72bdc7b 100644
--- a/pyhoca/wxgui/menus_taskbar.py
+++ b/pyhoca/wxgui/menus_taskbar.py
@@ -224,9 +224,9 @@ class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
                     _ts = self.Append(text=_(u"Transfer Session (not possible)"), id=ID_TRANSFERSESSION_DISABLED)
                     _ts.Enable(False)
 
-            if self._PyHocaGUI.disconnect_on_suspend and self._PyHocaGUI.exit_on_disconnect:
+            if self._PyHocaGUI.disconnect_on_suspend and self._PyHocaGUI.exit_on_disconnect and _s.has_terminal_session(): 
                 _ss = self.Append(text=_(u"Suspend Session (and disconnect/exit)"), id=ID_SUSPENDSESSION)
-            elif self._PyHocaGUI.disconnect_on_suspend:
+            elif self._PyHocaGUI.disconnect_on_suspend and _s.has_terminal_session():
                 _ss = self.Append(text=_(u"Suspend Session (and disconnect)"), id=ID_SUSPENDSESSION)
             else:
                 _ss = self.Append(text=_(u"Suspend Session"), id=ID_SUSPENDSESSION)
@@ -234,9 +234,9 @@ class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
             if _s.is_published_applications_provider() and not self._PyHocaGUI.get_profile_config(profile_name)['published']:
                 _ss.Enable(False)
 
-        if self._PyHocaGUI.disconnect_on_terminate and self._PyHocaGUI.exit_on_disconnect:
+        if self._PyHocaGUI.disconnect_on_terminate and self._PyHocaGUI.exit_on_disconnect and _s.has_terminal_session():
             self.Append(text=_(u"Terminate Session (and disconnect/exit)"), id=ID_SUSPENDSESSION)
-        elif self._PyHocaGUI.disconnect_on_terminate:
+        elif self._PyHocaGUI.disconnect_on_terminate and _s.has_terminal_session():
             self.Append(text=_(u"Terminate Session (and disconnect)"), id=ID_TERMINATESESSION)
         else:
             self.Append(text=_(u"Terminate Session"), id=ID_TERMINATESESSION)
@@ -543,9 +543,9 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu):
                         if _pubapp_session.is_running():
                             _refresh_menu_item = self.Append(text=_(u"Refresh menu tree"), id=ID_REFRESHMENU)
                             self.AppendSeparator()
-                            if self._PyHocaGUI.disconnect_on_suspend and self._PyHocaGUI.exit_on_disconnect:
+                            if self._PyHocaGUI.disconnect_on_suspend and self._PyHocaGUI.exit_on_disconnect and _pubapp_session.has_terminal_session():
                                 _suspend_item = self.Append(text=_(u"Suspend Session (and disconnect/exit)"), id=ID_SUSPENDSESSION)
-                            elif self._PyHocaGUI.disconnect_on_suspend:
+                            elif self._PyHocaGUI.disconnect_on_suspend and _pubapp_session.has_terminal_session():
                                 _suspend_item = self.Append(text=_(u"Suspend Session (and disconnect)"), id=ID_SUSPENDSESSION)
                             else:
                                 _suspend_item = self.Append(text=_(u"Suspend Session"), id=ID_SUSPENDSESSION)
@@ -556,9 +556,9 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu):
                             _resume_item = self.Append(text=_(u"Resume Session"), id=ID_RESUMESESSION)
                             if _session_name_disabled:
                                 _resume_item.Enable(False)
-                        if self._PyHocaGUI.disconnect_on_terminate and self._PyHocaGUI.exit_on_disconnect:
+                        if self._PyHocaGUI.disconnect_on_terminate and self._PyHocaGUI.exit_on_disconnect and _pubapp_session.has_terminal_session():
                             _terminate_item = self.Append(text=_(u"Terminate Session (and disconnect/exit)"), id=ID_TERMINATESESSION)
-                        elif self._PyHocaGUI.disconnect_on_terminate:
+                        elif self._PyHocaGUI.disconnect_on_terminate and _pubapp_session.has_terminal_session():
                             _terminate_item = self.Append(text=_(u"Terminate Session (and disconnect)"), id=ID_TERMINATESESSION)
                         else:
                             _terminate_item = self.Append(text=_(u"Terminate Session"), id=ID_TERMINATESESSION)


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