The branch, master has been updated via 90aad3a3a8d6c92d41deccde992980181f3acd23 (commit) from 978b28093cac10c0b230af8d3fe71de3e8d865e0 (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 90aad3a3a8d6c92d41deccde992980181f3acd23 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Apr 14 22:11:23 2012 +0200 Provide X2goClient.get_published_applications() method. ----------------------------------------------------------------------- Summary of changes: debian/changelog | 1 + x2go/backends/control/_stdout.py | 7 +++++-- x2go/client.py | 31 +++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index e7c49da..2204732 100644 --- a/debian/changelog +++ b/debian/changelog @@ -92,6 +92,7 @@ python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low - Transform blanks in mount points into underscores. - Add support for renaming X2Go session windows on Windows. - Add support for Windows for bringing X2Go session windows to foreground. + - Provide X2goClient.get_published_applications() method. * Depend on python-xlib. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Sat, 28 Sep 2012 01:44:21 +0100 diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py index 01b4c30..fa6d78b 100644 --- a/x2go/backends/control/_stdout.py +++ b/x2go/backends/control/_stdout.py @@ -1030,10 +1030,13 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): if hasattr(self.associated_terminals[_session_name], 'session_info') and not self.associated_terminals[_session_name].is_session_info_protected(): self.associated_terminals[_session_name].session_info.update(_listsessions[_session_name]) else: - del self.associated_terminals[_session_name] + try: del self.associated_terminals[_session_name] + except KeyError: pass self.terminated_terminals.append(_session_name) if _terminal.is_suspended(): - del self.associated_terminals[_session_name] + try: del self.associated_terminals[_session_name] + except KeyError: pass + return _listsessions diff --git a/x2go/client.py b/x2go/client.py index 4fed0e3..c64259e 100644 --- a/x2go/client.py +++ b/x2go/client.py @@ -141,6 +141,7 @@ from defaults import X2GO_SESSIONPROFILES_FILENAME as _X2GO_SESSIONPROFILES_FILE from defaults import X2GO_SETTINGS_FILENAME as _X2GO_SETTINGS_FILENAME from defaults import X2GO_PRINTING_FILENAME as _X2GO_PRINTING_FILENAME from defaults import X2GO_XCONFIG_FILENAME as _X2GO_XCONFIG_FILENAME +from defaults import PUBAPP_MAX_NO_SUBMENUS as _PUBAPP_MAX_NO_SUBMENUS from defaults import BACKENDS_CONTROLSESSION as _BACKENDS_CONTROLSESSION from defaults import BACKENDS_TERMINALSESSION as _BACKENDS_TERMINALSESSION @@ -1093,6 +1094,36 @@ class X2goClient(object): return self.session_registry(session_uuid).get_session_info() __get_session_info = get_session_info + def get_published_applications(self, session_uuid=None, profile_name=None, lang=None, refresh=False, raw=False, very_raw=False, max_no_submenus=_PUBAPP_MAX_NO_SUBMENUS): + """\ + Retrieve the server-side X2Go published applications menu for the session + registered under C{session_uuid} or for profile name C{profile_name}. + + @param session_uuid: the X2Go session's UUID registry hash + @type session_uuid: C{str} + @param profile_name: a valid session profile name + @type profile_name: C{str} + + @return: a representative of the published applications menu tree + @rtype: C{dict} + + """ + if session_uuid is None and profile_name: + _session_uuids = self._X2goClient__client_pubapp_sessions_of_profile_name(profile_name, return_objects=False) + if len(_session_uuids): session_uuid = _session_uuids[0] + if session_uuid: + try: + if self.session_registry(session_uuid).is_published_applications_provider(): + return self.session_registry(session_uuid).get_published_applications(lang=lang, refresh=refresh, raw=raw, very_raw=False, max_no_submenus=max_no_submenus) + except x2go_exceptions.X2goSessionRegistryException: + pass + else: + self.logger('Cannot find a terminal session for profile ,,%s\'\' that can be used to query a published applications menu tree' % profile_name, loglevel=log.loglevel_INFO) + return None + __get_published_applications = get_published_applications + profile_get_published_applications = get_published_applications + __profile_get_published_applications = get_published_applications + def set_session_username(self, session_uuid, username): """\ Set the session username for the L{X2goSession} that has been registered under C{session_uuid}. hooks/post-receive -- python-x2go.git (Python X2Go Client API) 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 "python-x2go.git" (Python X2Go Client API).