[X2Go-Commits] pyhoca-gui.git - twofactorauth (branch) updated: 81769111dd52813d3798fb9bae9bf20665a191a9

X2Go dev team git-admin at x2go.org
Sat Sep 14 15:54:20 CEST 2013


The branch, twofactorauth has been updated
       via  81769111dd52813d3798fb9bae9bf20665a191a9 (commit)
      from  c68a51166f22786aae66cebdaaf0353da00b6da5 (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 |   26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

The diff of changes is:
diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py
index 0ca1ae4..f64791e 100644
--- a/pyhoca/wxgui/notify.py
+++ b/pyhoca/wxgui/notify.py
@@ -89,16 +89,11 @@ class libnotify_NotifierPopup(object):
         pass
 
 
-class _DirectTipProvider(wx.TipProvider):
-    def __init__(self, tip_text, ):
-        self._direct_tip = tip_text
-    def GetTip(self):
-        return self._direct_tip
-
 class win32gui_NotifierPopup(object):
 
     title = {}
     text = {}
+    icon = {}
 
     def __init__(self, _PyHocaGUI):
         self._PyHocaGUI = _PyHocaGUI
@@ -110,6 +105,8 @@ class win32gui_NotifierPopup(object):
             self.title[context] = title
         if text is not None:
             self.text[context] = text
+        if icon is not None:
+            self.icon[context] = icon
 
     def send(self, title=None, text=None, context=None, icon=None, timeout=8000):
         if context is not None:
@@ -123,9 +120,22 @@ class win32gui_NotifierPopup(object):
                 del self.text[context]
             except KeyError:
                 pass
+            try:
+                icon = self.icon[context]
+                del self.icon[context]
+            except KeyError:
+                pass
 
-        _tip_provider = _DirectTipProvider('%s: %s' % (title, text))
-        wx.ShowTip(None, _tip_provider)
+        from wx.lib.agw import balloontip
+        icon = None
+        _tip = balloontip.BalloonTip(topicon=icon,
+                                     toptitle=title,
+                                     message=text,
+                                     tipstyle=balloontip.BT_BUTTON)
+        _tip.SetTarget(self._PyHocaGUI)
+        _tip.SetStartDelay(1)
+        _tip.SetEndDelay(1000)
+        
         self._pyhoca_logger(text, loglevel=log.loglevel_NOTICE)
 
     def Close(self):


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