The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated via e3fa250522b775ba2d60b702c5fc32d1f0e6624d (commit) from 81769111dd52813d3798fb9bae9bf20665a191a9 (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/wxgui/notify.py | 52 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 11 deletions(-) The diff of changes is: diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py index f64791e..10f28be 100644 --- a/pyhoca/wxgui/notify.py +++ b/pyhoca/wxgui/notify.py @@ -19,7 +19,7 @@ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. import os -import wx, time, webbrowser +import wx from x2go import X2GOCLIENT_OS from x2go import log if X2GOCLIENT_OS in ('Linux', 'Mac'): @@ -27,9 +27,12 @@ if X2GOCLIENT_OS in ('Linux', 'Mac'): import exceptions if os.environ.has_key('PYHOCAGUI_DEVELOPMENT') and os.environ['PYHOCAGUI_DEVELOPMENT'] == '1': - _icons_location = 'file://%s/icons' % os.path.abspath(os.path.curdir) + _icons_location = os.path.join(os.path.abspath(os.path.curdir), 'icons') else: - _icons_location = 'file:///usr/share/icons' + if X2GOCLIENT_OS == 'Windows': + _icons_location = os.path.join(os.environ['ProgramFiles'], 'PyHoca-GUI', 'icons') + else: + _icons_location = '/usr/share/icons' class NotSupportedException(exceptions.StandardError): pass @@ -74,7 +77,7 @@ class libnotify_NotifierPopup(object): except KeyError: pass - icon = '%s/PyHoca/32x32/%s.png' % (_icons_location, icon) + icon = 'file://%s/PyHoca/32x32/%s.png' % (_icons_location, icon) n = pynotify.Notification(title, text, icon) n.set_urgency(pynotify.URGENCY_NORMAL) @@ -126,15 +129,42 @@ 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', + } from wx.lib.agw import balloontip - icon = None - _tip = balloontip.BalloonTip(topicon=icon, + 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, - tipstyle=balloontip.BT_BUTTON) - _tip.SetTarget(self._PyHocaGUI) - _tip.SetStartDelay(1) - _tip.SetEndDelay(1000) + 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) 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)).