home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 October / maximum-cd-2011-10.iso / DiscContents / digsby_setup.exe / lib / gui / native / win / taskbar.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2011-06-22  |  1.1 KB  |  43 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.6)
  3.  
  4. import wx
  5. import cgui
  6. tab_notebook_attr = '_tab_notebook'
  7.  
  8. def get_tab_notebook(tlw):
  9.     
  10.     try:
  11.         return getattr(tlw, tab_notebook_attr)
  12.     except AttributeError:
  13.         nb = cgui.TabNotebook(tlw)
  14.         setattr(tlw, tab_notebook_attr, nb)
  15.         return nb
  16.  
  17.  
  18.  
  19. def app_taskbar_notebook():
  20.     nb = None
  21.     others = []
  22.     for win in wx.GetTopLevelWindows():
  23.         if win.IsShown() and win.OnTaskbar:
  24.             nb = get_tab_notebook(win)
  25.             break
  26.             continue
  27.     
  28.     return nb
  29.  
  30.  
  31. def set_overlay_icon(icon, tlw = None):
  32.     if icon is None:
  33.         icon = wx.NullBitmap
  34.     
  35.     if tlw is None:
  36.         nb = app_taskbar_notebook()
  37.     else:
  38.         nb = get_tab_notebook(tlw)
  39.     if nb is not None:
  40.         return nb.SetOverlayIcon(icon)
  41.     return False
  42.  
  43.