The branch, master has been updated via cb74f7eb426cf6109e1aea88f47f7440e4a39566 (commit) from 1f56909114c7056270586a3481d278c4faad4218 (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 cb74f7eb426cf6109e1aea88f47f7440e4a39566 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sun Mar 18 21:56:55 2012 +0100 Make published_applications_no_submenus an <int> session option that controls how many menu items will be shown without rendering category based submenus. ----------------------------------------------------------------------- Summary of changes: debian/changelog | 3 +++ x2go/backends/control/_stdout.py | 12 ++++++++++-- x2go/session.py | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 2a5d24b..b38d8da 100644 --- a/debian/changelog +++ b/debian/changelog @@ -49,6 +49,9 @@ python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low - Add support for published applications with no category submenus. Fix default language in published applications menu tree. - Fix X2Go printing, do not spawn a gevent process for printing. + - Make published_applications_no_submenus an <int> session option that + controls how many menu items will be shown without rendering category based + submenus. * 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 fbf0844..58c6922 100644 --- a/x2go/backends/control/_stdout.py +++ b/x2go/backends/control/_stdout.py @@ -99,6 +99,7 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): sessions_rootdir=os.path.join(defaults.LOCAL_HOME, defaults.X2GO_SESSIONS_ROOTDIR), ssh_rootdir=os.path.join(defaults.LOCAL_HOME, defaults.X2GO_SSH_ROOTDIR), logger=None, loglevel=log.loglevel_DEFAULT, + published_applications_no_submenus=0, *args, **kwargs): """\ Initialize an X2Go session. With the L{X2goControlSessionSTDOUT} class you can start @@ -148,6 +149,7 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): self.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.session_died = False + self.published_applications_no_submenus = published_applications_no_submenus def get_hostname(self): return self.hostname @@ -620,13 +622,19 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): @rtype: C{list} """ + if defaults.X2GOCLIENT_OS != 'Windows' and lang is None: lang = locale.getdefaultlocale()[0] elif lang is None: lang = 'en' if 'X2GO_PUBLISHED_APPLICATIONS' in self._x2go_server_features: - if self._published_applications_menu is {} or not self._published_applications_menu.has_key(lang) or raw or very_raw or refresh: + if self._published_applications_menu is {} or \ + not self._published_applications_menu.has_key(lang) or \ + raw or very_raw or refresh or \ + (self.published_applications_no_submenus != max_no_submenus): + + self.published_applications_no_submenus = max_no_submenus ### STAGE 1: retrieve menu from server @@ -659,7 +667,7 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): self.logger('published applications query for %s finished, returning raw output' % self.profile_name, loglevel=log.loglevel_NOTICE) return _menu - if max_no_submenus and len(_menu) > max_no_submenus: + if len(_menu) > max_no_submenus >= 0: _render_submenus = True else: _render_submenus = False diff --git a/x2go/session.py b/x2go/session.py index 5644888..b8b3540 100644 --- a/x2go/session.py +++ b/x2go/session.py @@ -67,7 +67,7 @@ _X2GO_SESSION_PARAMS = ('geometry', 'depth', 'link', 'pack', 'rootdir', 'loglevel', 'profile_name', 'profile_id', 'print_action', 'print_action_args', 'convert_encoding', 'client_encoding', 'server_encoding', - 'proxy_options', 'published_applications', + 'proxy_options', 'published_applications', 'published_applications_no_submenus', 'logger', 'control_backend', 'terminal_backend', 'proxy_backend', 'profiles_backend', 'settings_backend', 'printing_backend', @@ -1245,7 +1245,7 @@ class X2goSession(object): @rtype: C{list} """ - return self.control_session.get_published_applications(lang=lang, refresh=refresh, raw=raw, very_raw=very_raw) + return self.control_session.get_published_applications(lang=lang, refresh=refresh, raw=raw, very_raw=very_raw, max_no_submenus=max_no_submenus) def exec_published_application(self, exec_name): """\ 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).