[X2Go-Commits] pyhoca-gui.git - twofactorauth (branch) updated: 0.0.31.0-79-g5e735e1
X2Go dev team
git-admin at x2go.org
Sat Sep 14 15:54:54 CEST 2013
The branch, twofactorauth has been updated
via 5e735e14d5a5fa1bb007d15e90aeacc1352b53c2 (commit)
from 3d5aeae87b5a7dd456f99e9ff9b3007c83f6850b (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 | 3 +++
pyhoca-gui | 1 +
pyhoca/wxgui/frontend.py | 19 +++++++++++--------
3 files changed, 15 insertions(+), 8 deletions(-)
The diff of changes is:
diff --git a/man/pyhoca-gui.1 b/man/pyhoca-gui.1
index 9a4bdc4..39c3d8e 100644
--- a/man/pyhoca-gui.1
+++ b/man/pyhoca-gui.1
@@ -67,6 +67,9 @@ session profile names to this option.
\*(T<\fB\-\-show-profile-metatypes\fR\*(T>
Show descriptive meta information on session profiles in menus (NOTE: this makes menus appear a bit more sluggish, use it mostly for debugging).
.TP
+\*(T<\fB\-\-hide-trayicon\fR\*(T>
+Hide \fBpyhoca-gui\fR's main icon in the notification area / system tray.
+.TP
\*(T<\fB\-\-auto-connect\fR\*(T>
Connect sessions via SSH public key authentication on application startup, if possible.
.TP
diff --git a/pyhoca-gui b/pyhoca-gui
index 3780f0d..a63fc84 100755
--- a/pyhoca-gui
+++ b/pyhoca-gui
@@ -170,6 +170,7 @@ x2go_gui_options = [
{'args':['-P','--session-profile'], 'default': None, 'help': 'directly connect to a session profile', },
{'args':['--auto-connect'], 'default': False, 'action': 'store_true', 'help': 'connect sessions via SSH pubkey authentication if possible', },
{'args':['--show-profile-metatypes'], 'default': False, 'action': 'store_true', 'help': 'show descriptive meta information on session profiles in menus (NOTE: this makes menus appear a bit more sluggish, use it mostly for debugging)', },
+ {'args':['--hide-trayicon'], 'default': False, 'action': 'store_true', 'help': 'hide PyHoca-GUI\'s main icon in the notification area / system tray', },
{'args':['--start-on-connect'], 'default': False, 'action': 'store_true', 'help': 'start a session directly after authentication', },
{'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', },
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index 0258223..273b4d3 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -100,8 +100,6 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
"""
wx.BeginBusyCursor()
- #splash_bitmap = wx.Bitmap(os.path.join(basepath.images_basepath, 'pyhoca-splash.png'), wx.BITMAP_TYPE_PNG)
- #wx.SplashScreen(splash_bitmap, splashStyle=wx.SPLASH_CENTRE_ON_SCREEN|wx.SPLASH_TIMEOUT, milliseconds=3000, parent=None, style=wx.SIMPLE_BORDER|wx.STAY_ON_TOP|wx.FRAME_NO_TASKBAR)
splash.PyHocaGUI_SplashScreen()
wx.Yield()
@@ -179,6 +177,7 @@ 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
self.show_profile_metatypes = self.args.show_profile_metatypes
+ self.hide_trayicon = self.args.hide_trayicon
self._pyhoca_logger('PyHoca GUI is starting up', loglevel=x2go.log.loglevel_INFO, )
self._pyhoca_logger('registering PyHocaGUI control sessions', loglevel=x2go.log.loglevel_INFO, )
@@ -186,9 +185,10 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
self.about = about.PyHocaGUI_AboutFrame(self)
self.about.Show(False)
- self.taskbar = taskbar.PyHocaGUI_TaskBarIcon(self.about)
- self.taskbar.Bind(wx.EVT_TASKBAR_LEFT_DCLICK, lambda _Show: self.about.Show(True))
- self.taskbar.Bind(wx.EVT_TASKBAR_LEFT_DOWN, self.taskbar.CreateSessionManagerPopupMenu)
+ if not self.hide_trayicon:
+ self.taskbar = taskbar.PyHocaGUI_TaskBarIcon(self.about)
+ self.taskbar.Bind(wx.EVT_TASKBAR_LEFT_DCLICK, lambda _Show: self.about.Show(True))
+ self.taskbar.Bind(wx.EVT_TASKBAR_LEFT_DOWN, self.taskbar.CreateSessionManagerPopupMenu)
if x2go.X2GOCLIENT_OS in ('Linux', 'Mac'):
self.notifier = notify.libnotify_NotifierPopup(self)
@@ -258,7 +258,8 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
for _win in self._sub_windows:
_win.Close()
_win.Destroy()
- self.taskbar.Close()
+ if not self.hide_trayicon:
+ self.taskbar.Close()
self.about.Close()
self.about.Destroy()
x2go.x2go_cleanup()
@@ -364,7 +365,8 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
except:
self.notifier.send('%s - connect error' % profile_name, 'An unknown error occurred during authentication!', icon='auth_error', timeout=4000)
self._temp_disabled_profile_names.remove(profile_name)
- self.taskbar.SetIconIdle()
+ if not self.hide_trayicon:
+ self.taskbar.SetIconIdle()
def OnSessionAuthenticate(self, evt):
"""\
@@ -372,7 +374,8 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
"""
self.current_profile_name = self._eventid_profilenames_map[evt.GetId()]
- self.taskbar.SetIconConnecting(self.current_profile_name)
+ if not self.hide_trayicon:
+ self.taskbar.SetIconConnecting(self.current_profile_name)
session_uuid = self._X2goClient__register_session(profile_name=self.current_profile_name)
self._temp_disabled_profile_names.append(self.current_profile_name)
gevent.spawn(self._do_authenticate, evt, session_uuid)
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