home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2012 January / maximum-cd-2012-01.iso / DiscContents / digsby_setup.exe / lib / gui / toast / toasthelp.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2011-10-05  |  1.2 KB  |  27 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.6)
  3.  
  4. from common import pref, setpref
  5. from gui.toast.toast import popup
  6. from gui import skin
  7. import wx
  8. SHOWN_HELP_PREF = 'notifications.popups.help_shown'
  9. _didshow = False
  10.  
  11. def on_popup(options):
  12.     global _didshow, _didshow
  13.     if _didshow:
  14.         return None
  15.     if pref(SHOWN_HELP_PREF, default = False, type = bool):
  16.         _didshow = True
  17.         return None
  18.     _didshow = True
  19.     setpref(SHOWN_HELP_PREF, True)
  20.     popup(header = _('TIP: Popup Notifications'), major = None, minor = _('You can right click popups to close them right away instead of waiting for them to fade out.'), sticky = True, icon = skin.get('appdefaults.notificationicons.error'), always_show = True)
  21.  
  22.  
  23. def enable_help():
  24.     import hooks
  25.     hooks.register('popup.pre', on_popup)
  26.  
  27.