The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated via 50f0d0c7d81cc3d449d25b696e65012c9524abad (commit) from 24e9b58ccaa771cc4408c9dcebb7d372f6de7ac2 (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: pyhoca-gui | 5 ++++ pyhoca/wxgui/frontend.py | 7 +++++- pyhoca/wxgui/notify.py | 63 ++++++++++++++++++++-------------------------- 3 files changed, 38 insertions(+), 37 deletions(-) The diff of changes is: diff --git a/pyhoca-gui b/pyhoca-gui index b88cfe6..cda3bab 100755 --- a/pyhoca-gui +++ b/pyhoca-gui @@ -29,8 +29,13 @@ import subprocess try: import wxversion + wxversion.select('2.9') +except: pass +try: + import wxversion wxversion.select('2.8') except: pass + import argparse import os import os.path diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py index 10a5df3..473d8d9 100644 --- a/pyhoca/wxgui/frontend.py +++ b/pyhoca/wxgui/frontend.py @@ -23,13 +23,18 @@ modules ={} try: import wxversion wxversion.select('2.9') + print 'USING wxPython 2.9' + except: pass try: import wxversion wxversion.select('2.8') + print 'USING wxPython 2.8' + except: pass + # Python X2go import x2go @@ -141,7 +146,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient): if x2go.X2GOCLIENT_OS in ('Linux', 'Mac'): self.notifier = notify.libnotify_NotifierPopup(self) if x2go.X2GOCLIENT_OS in ('Windows'): - self.notifier = notify.win32gui_NotifierPopup(self) + self.notifier = notify.notificationmessage_NotifierPopup(self) self._sub_windows = [] self._eventid_profilenames_map = {} diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py index 10f28be..25d15d3 100644 --- a/pyhoca/wxgui/notify.py +++ b/pyhoca/wxgui/notify.py @@ -92,7 +92,7 @@ class libnotify_NotifierPopup(object): pass -class win32gui_NotifierPopup(object): +class notificationmessage_NotifierPopup(object): title = {} text = {} @@ -129,42 +129,33 @@ class win32gui_NotifierPopup(object): except KeyError: pass - _icon_map = { - 'auth_success': 'dialog-apply', - 'auth_failed': 'dialog-error', - 'auth_error': 'dialog-warning', - 'auth_disconnect': 'network-wired', - 'profile_add': 'list-add', - 'profile_delete': 'edit-delete', - 'profile_edit': 'gtk-edit', - 'profile_save': 'document-save', - 'session_cleanall': 'broom-cleanup', - 'session_error': 'dialog-error', - 'session_pause': 'media-playback-pause', - 'session_resume': 'x2go-logo-rotated', - 'session_start': 'x2go-logo-rotated', - 'session_terminate': 'window-close', - 'session_warning': 'dialog-warning', + _icon_map_wx = { + 'auth_success': wx.ICON_INFORMATION, + 'auth_failed': wx.ICON_WARNING, + 'auth_error': wx.ICON_ERROR, + 'auth_disconnect': wx.ICON_INFORMATION, + 'profile_add': wx.ICON_INFORMATION, + 'profile_delete': wx.ICON_INFORMATION, + 'profile_edit': wx.ICON_INFORMATION, + 'profile_save': wx.ICON_INFORMATION, + 'session_cleanall': wx.ICON_INFORMATION, + 'session_error': wx.ICON_ERROR, + 'session_pause': wx.ICON_INFORMATION, + 'session_resume': wx.ICON_INFORMATION, + 'session_start': wx.ICON_INFORMATION, + 'session_terminate': wx.ICON_INFORMATION, + 'session_warning': wx.ICON_WARNING, } - from wx.lib.agw import balloontip - from wx.lib.agw import toasterbox - from wx.lib.agw import supertooltip - if icon in _icon_map.keys(): - icon = _icon_map[icon] - icon = os.path.normpath('%s/PyHoca/32x32/%s.png' % (_icons_location, icon)) - _img = wx.Image(icon) - _icon = wx.IconFromBitmap(_img.ConvertToBitmap()) - _tooltip = supertooltip.SuperToolTip(text, header=title, headerBmp=_img.ConvertToBitmap()) - - - _tip = balloontip.BalloonTip(topicon=_icon, - toptitle=title, - message=text) - _frame = wx.Frame(None, -1, size=wx.DisplaySize()) - _frame.ShowFullScreen(False, style=wx.FULLSCREEN_ALL) - _tooltip.SetUseFade(True) - _tooltip.SetTarget(self._PyHocaGUI.taskbar) - _tooltip.SetStartDelay(1000) + if icon in _icon_map_wx.keys(): + icon = _icon_map_wx[icon] + else: + icon = wx.ICON_INFORMATION + _notification_msg = wx.NotificationMessage() + _notification_msg.SetTitle(title) + _notification_msg.SetMessage(text) + #_notification_msg.SetParent(self._PyHocaGUI) + _notification_msg.SetFlags(icon) + _notification_msg.Show(timeout=1) self._pyhoca_logger(text, loglevel=log.loglevel_NOTICE) 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)).