The branch, twofactorauth has been updated via ea7ea6507c14479933a643257d9496fa58727da9 (commit) from 5c9619b3f1a8c241a5ede97b644c2794e512113c (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 ++ x2go/backends/control/_stdout.py | 15 ++++++++++++++- x2go/session.py | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 9550438..59fedfd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -46,6 +46,8 @@ python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low - Render and cache dictionary based published applications menu tree in Python X2Go. Cache the tree once rendered. - Fix availablity check of client-side folder sharing. + - Add support for published applications with no category submenus. Fix + default language in published applications menu tree. * 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 4366f5f..fbf0844 100644 --- a/x2go/backends/control/_stdout.py +++ b/x2go/backends/control/_stdout.py @@ -34,6 +34,7 @@ import copy import string import random import re +import locale from gevent import socket @@ -596,7 +597,7 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): return True return False - def get_published_applications(self, lang='en', refresh=False, raw=False, very_raw=False): + def get_published_applications(self, lang=None, refresh=False, raw=False, very_raw=False, max_no_submenus=0): """\ Retrieve the menu tree of published applications from X2Go server. @@ -619,6 +620,10 @@ 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: @@ -654,6 +659,10 @@ 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: + _render_submenus = True + else: + _render_submenus = False # STAGE 3: create menu structure in a Python dictionary @@ -669,6 +678,7 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): 'System': [], 'Utilities': [], 'Other Applications': [], + 'NO_SUBMENUS': [], } } _empty_menus = _category_map[lang].keys() @@ -729,6 +739,9 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): if not _menu_entry_cat: _menu_entry_cat = 'Other Applications' + if not _render_submenus: + _menu_entry_cat = 'NO_SUBMENUS' + if _menu_entry_cat in _empty_menus: _empty_menus.remove(_menu_entry_cat) diff --git a/x2go/session.py b/x2go/session.py index 8a05bee..5644888 100644 --- a/x2go/session.py +++ b/x2go/session.py @@ -1225,7 +1225,7 @@ class X2goSession(object): return self.terminal_session.is_desktop_session() return False - def get_published_applications(self, lang='en', refresh=False, raw=False, very_raw=False): + def get_published_applications(self, lang=None, refresh=False, raw=False, very_raw=False, max_no_submenus=0): """\ Return a list of published menu items from the X2Go server for session type published applications. 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).