The branch, master has been updated via 1dffd63ae48c8936ed87b68ee7f8240bad7c179d (commit) from 05e3a08419451b405d1a8b1d6e676df554b8c1c0 (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 1dffd63ae48c8936ed87b68ee7f8240bad7c179d Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Mar 22 23:54:54 2012 +0100 work on exit handler ----------------------------------------------------------------------- Summary of changes: pyhoca/wxgui/frontend.py | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) The diff of changes is: diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py index 4ec9ef0..5d7fc85 100644 --- a/pyhoca/wxgui/frontend.py +++ b/pyhoca/wxgui/frontend.py @@ -76,9 +76,9 @@ def SetExitHandler(func): import win32api result = win32api.SetConsoleCtrlHandler( func, True ) if result == 0: - print '\nCould not SetConsoleCtrlHandler (error %r)' % win32api.GetLastError() + print '\nCould not SetConsoleCtrlHandler (error %r)\n' % win32api else : - print '\nSetConsoleCtrlHandler SUCCESS' + print '\nSetConsoleCtrlHandler SUCCESS\n' except ImportError : version = '.'.join( map( str, sys.version_info[ :2] ) ) @@ -87,6 +87,7 @@ def SetExitHandler(func): else : import signal signal.signal( signal.SIGTERM, func ) + signal.signal( signal.SIGINT, func ) class PyHocaGUI(wx.App, x2go.X2goClient): @@ -175,17 +176,15 @@ class PyHocaGUI(wx.App, x2go.X2goClient): x2go.X2goClient.__init__(self, **_x2goclient_kwargs) - SetExitHandler(self._exit_handler) wx.App.__init__(self, redirect=False, clearSigInt=False) + + SetExitHandler(self._exit_handler) + if not self.args.disable_splash: splash.PyHocaGUI_SplashScreen() self.Bind(wx.EVT_IDLE, self.OnIdle) - def _exit_handler(self): - WakeUpIdle() - ExitMainLoop() - def OnInit(self): """\ STILL UNDOCUMENTED @@ -315,6 +314,11 @@ class PyHocaGUI(wx.App, x2go.X2goClient): elif self.resume_all_on_connect: self._X2goClient__session_auto_start_or_resume(session_uuid, all_suspended=True, start=self.start_on_connect) + def _exit_handler(self, *args): + print "HALLO" + self.WakeUpIdle() + self.ExitMainLoop() + # wx.App's OnExit method def OnExit(self): """\ @@ -331,6 +335,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient): self._hide_notifications_map[profile_name].append(session_obj.get_session_name()) gevent.spawn(session_obj.suspend) x2go.x2go_cleanup() + self.about.Close() self.taskbar.Close() 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)).