The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated via 82f0f4663240c63df35459d122444b40d20c1d15 (commit) from ef2eada1d0f9159b569473c1124dca0178ba6e8b (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: man/pyhoca-gui.1 | 6 ++++++ pyhoca-gui | 8 +++++--- pyhoca/wxgui/frontend.py | 38 ++++++++++++++++++++++++++++++++++---- pyhoca/wxgui/menus_taskbar.py | 27 +++++++++++++++++++-------- pyhoca/wxgui/notify.py | 2 +- pyhoca/wxgui/taskbar.py | 4 ++-- 6 files changed, 67 insertions(+), 18 deletions(-) The diff of changes is: diff --git a/man/pyhoca-gui.1 b/man/pyhoca-gui.1 index f6f5561..f8bbae9 100644 --- a/man/pyhoca-gui.1 +++ b/man/pyhoca-gui.1 @@ -75,6 +75,12 @@ After authentication directly auto-resume the oldest available running/suspended .TP \*(T<\fB\-\-resume-all-on-connect\fR\*(T> After authentication directly auto-resume all available running/suspended session. +.TP +\*(T<\fB\-\-disable-options\fR\*(T> +Grey-out the ,,Options'' menu item and thus disable the client configuration window. +.TP +\*(T<\fB\-\-disable-profilemanager\fR\*(T> +Grey-out the profile manager menu items and thus disable all profile management functionalities. .SH "SEE ALSO" \fB/usr/share/doc/pyhoca-gui\fR .SH AUTHOR diff --git a/pyhoca-gui b/pyhoca-gui index 61619c0..cad029f 100755 --- a/pyhoca-gui +++ b/pyhoca-gui @@ -40,7 +40,7 @@ import exceptions app = sys.argv[0] if app.startswith('./'): sys.path.insert(0, os.path.join(os.path.dirname(__file__))) - os.environ['PYHOCAGUI_LOCAL'] = '1' + os.environ['PYHOCAGUI_DEVELOPMENT'] = '1' # Python X2go modules import x2go @@ -61,8 +61,8 @@ VERSION: %s """ % (PROG_NAME, PROG_PID, VERSION) -__author__ = "Dick J. Kniep" -__version__ = "$Id$" +__author__ = "Dick J. Kniep, Mike Gabriel" +__version__ = "0.0.1" # debug options... debug_options = [ @@ -80,6 +80,8 @@ x2go_gui_options = [ {'args':['--resume-newest-on-connect', '--resume-on-connect'], 'default': False, 'action': 'store_true', 'help': ' on connect auto-resume the newest suspended session', }, {'args':['--resume-oldest-on-connect'], 'default': False, 'action': 'store_true', 'help': ' on connect auto-resume the oldest suspended session', }, {'args':['--resume-all-on-connect'], 'default': False, 'action': 'store_true', 'help': 'auto-resume all suspended session on connect', }, + {'args':['--disable-options'], 'default': False, 'action': 'store_true', 'help': 'disable the client options configuration window', }, + {'args':['--disable-profilemanager'], 'default': False, 'action': 'store_true', 'help': 'disable the session profile manager window', }, ] def parseargs(): diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py index 8158807..41ce849 100644 --- a/pyhoca/wxgui/frontend.py +++ b/pyhoca/wxgui/frontend.py @@ -28,6 +28,7 @@ except: pass # Python X2go import x2go +import os import gevent import gevent.monkey gevent.monkey.patch_all() @@ -70,7 +71,7 @@ wx.SetDefaultPyEncoding("utf-8") class PyHocaGUI(wx.App, x2go.X2goClient): def __init__(self, args, logger, liblogger, - appname='PyHoca-GUI -- Python based X2go Client', + appname='PyHoca-GUI', vendorname='Open Source Software Foundation',): """\ STILL UNDOCUMENTED @@ -81,10 +82,10 @@ class PyHocaGUI(wx.App, x2go.X2goClient): self.args = args if logger is None: - self._pyhoca_logger = x2go.X2goLogger(tag='PyHocaGUI') + self._pyhoca_logger = x2go.X2goLogger(tag=self.appname) else: self._pyhoca_logger = copy.deepcopy(logger) - self._pyhoca_logger.tag = 'PyHocaGUI' + self._pyhoca_logger.tag = self.appname if liblogger is None: self._pyhoca_liblogger = x2go.X2goLogger() @@ -165,6 +166,21 @@ class PyHocaGUI(wx.App, x2go.X2goClient): self.resume_oldest_on_connect =self.args.resume_oldest_on_connect self.resume_all_on_connect =self.args.resume_all_on_connect + ### + ### disable functionality for release versions + ### + if os.environ['PYHOCAGUI_DEVELOPMENT'] == '1': + self.options_disabled = self.args.disable_options + self.profilemanager_disabled = self.args.disable_profilemanager + else: + self._pyhoca_logger('the current release of %s does not support client configuration' % self.appname, loglevel=x2go.log.loglevel_WARN) + self.options_disabled = True + self._pyhoca_logger('the current release of %s does not support profile management' % self.appname, loglevel=x2go.log.loglevel_WARN) + self.profilemanager_disabled = True + + self.options_disabled = self.args.disable_options + self.profilemanager_disabled = self.args.disable_profilemanager + if self.args.session_profile: for profile_name in self.args.session_profile.split(','): if not self._X2goClient__client_registered_sessions_of_name(profile_name): @@ -436,7 +452,21 @@ class PyHocaGUI(wx.App, x2go.X2goClient): STILL UNDOCUMENTED """ - self._pyhoca_logger(',,List Sessions\'\' not implemented yet', loglevel=x2go.log.loglevel_INFO, ) + self._pyhoca_logger('The ,,List Sessions\'\' information window is not implemented yet', loglevel=x2go.log.loglevel_WARN, ) + + def OnAbout(self, evt): + """\ + STILL UNDOCUMENTED + + """ + self._pyhoca_logger('The ,,About...\'\' window is not implemented yet', loglevel=x2go.log.loglevel_WARN, ) + + def OnOptions(self, evt): + """\ + STILL UNDOCUMENTED + + """ + self._pyhoca_logger('The ,,Options\'\' configuration window is not implemented yet', loglevel=x2go.log.loglevel_WARN, ) def OnClose(self, evt): """\ diff --git a/pyhoca/wxgui/menus_taskbar.py b/pyhoca/wxgui/menus_taskbar.py index eeb0e44..43617a5 100644 --- a/pyhoca/wxgui/menus_taskbar.py +++ b/pyhoca/wxgui/menus_taskbar.py @@ -70,25 +70,36 @@ class PyHocaGUI_Menu_TaskbarOptionsManager(wx.Menu): wx.Menu.__init__(self) + ID_ABOUT = wx.NewId() + self.Append(id=ID_ABOUT, text="About %s ..." % self._PyHocaGUI.appname) + self.Bind(wx.EVT_MENU, self._PyHocaGUI.OnAbout, id=ID_ABOUT) + + self.AppendSeparator() + ID_ADDPROFILE = wx.NewId() ID_PROFILEMANAGER = wx.NewId() - ID_OPTIONS = wx.NewId() - ID_EXIT = wx.NewId() - - self.Append(id=ID_ADDPROFILE, text="Add new X2go Session Profile") + _add_profile_item = self.Append(id=ID_ADDPROFILE, text="Add new X2go Session Profile") self.Bind(wx.EVT_MENU, self._PyHocaGUI.OnProfileAdd, id=ID_ADDPROFILE) - - self.AppendMenu(id=ID_PROFILEMANAGER, + _maintain_profiles_item = self.AppendMenu(id=ID_PROFILEMANAGER, text="Maintain X2go Session Profiles", submenu=PyHocaGUI_Menu_TaskbarProfileNames(self._PyHocaGUI, caller=self, submenu=PyHocaGUI_Menu_TaskbarManageProfile)) + if self._PyHocaGUI.profilemanager_disabled: + _add_profile_item.Enable(False) + _maintain_profiles_item.Enable(False) self.AppendSeparator() - self.Append(id=ID_OPTIONS, text="X2go Client Options") - #self.Bind(wx.EVT_MENU, self._PyHocaGUI.OnOptions, id=ID_OPTIONS) + + ID_OPTIONS = wx.NewId() + _options_item = self.Append(id=ID_OPTIONS, text="X2go Client Options") + self.Bind(wx.EVT_MENU, self._PyHocaGUI.OnOptions, id=ID_OPTIONS) + if self._PyHocaGUI.options_disabled: + _options_item.Enable(False) self.AppendSeparator() + + ID_EXIT = wx.NewId() self.Append(id=ID_EXIT, text="E&xit") self.Bind(wx.EVT_MENU, self._PyHocaGUI.OnTaskbarExit, id=ID_EXIT) diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py index aa001db..4566ae8 100644 --- a/pyhoca/wxgui/notify.py +++ b/pyhoca/wxgui/notify.py @@ -27,7 +27,7 @@ if X2GOCLIENT_OS in ('Linux', 'Mac'): import pynotify import exceptions -if os.environ['PYHOCAGUI_LOCAL'] == '1': +if os.environ['PYHOCAGUI_DEVELOPMENT'] == '1': _icons_location = 'file://%s/icons' % os.path.abspath(os.path.curdir) else: _icons_location = 'file:///usr/share/icons' diff --git a/pyhoca/wxgui/taskbar.py b/pyhoca/wxgui/taskbar.py index 36b3024..11f48b6 100644 --- a/pyhoca/wxgui/taskbar.py +++ b/pyhoca/wxgui/taskbar.py @@ -85,11 +85,11 @@ class PyHocaGUI_TaskBarIcon(wx.TaskBarIcon): def SetIconConnecting(self, profile_name): self.icon = self.MakeIcon(images.getx2goclientImage()) - self.SetIcon(self.icon, "PyHoca-GUI - connecting to %s..." % profile_name) + self.SetIcon(self.icon, "PyHoca-GUI (Python X2goClient)\nCurrently connecting you to remote X2go server ,,%s\'\'" % profile_name) def SetIconIdle(self): self.icon = self.MakeIcon(images.getx2goclientImage()) - self.SetIcon(self.icon, "PyHoca-GUI (Python X2go Client)") + self.SetIcon(self.icon, "PyHoca-GUI (Python X2goClient)\nClient for connecting you to a remote X2go server") def CreateSessionManagerPopupMenu(self, evt): """\ 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)).