示例#1
0
            def icon_updated(imwin):
                get_tab_notebook(imwin.Top).InvalidateThumbnails(imwin)

                def later():
                    if wx.IsDestroyed(imwin): return
                    set_overlay_icon(im_badge(), tlw=imwin.Top)
                wx.CallLater(300, later)
示例#2
0
文件: imtabs.py 项目: sgricci/digsby
            def icon_updated(imwin):
                get_tab_notebook(imwin.Top).InvalidateThumbnails(imwin)

                def later():
                    if wx.IsDestroyed(imwin): return
                    set_overlay_icon(im_badge(), tlw=imwin.Top)

                wx.CallLater(300, later)
示例#3
0
def install_taskbar_tabs(notebook, preview_type):
    import gui.native.win.taskbar as tb

    nb = tb.get_tab_notebook(notebook.Top)
    notebook.did_add += lambda win: nb.CreateTab(win, preview_type())
    notebook.did_remove += nb.DestroyTab
    notebook.did_rearrange += nb.RearrangeTab
    notebook.did_activate += nb.SetTabActive
    notebook.did_seticon += lambda page, icon: nb.SetTabIcon(
        page, icon) if icon is not None else wx.NullBitmap
    notebook.did_settitle += nb.SetTabTitle

    if False:  # debugging

        def foo(s):
            def handler(*a, **k):
                print '#' * 80
                print notebook, s
                print a, k

            return handler

        notebook.did_add += foo('did_add')
        notebook.did_remove += foo('did_remove')
        notebook.did_rearrange += foo('did_rearrange')
示例#4
0
def install_taskbar_tabs(notebook, preview_type):
    import gui.native.win.taskbar as tb

    nb = tb.get_tab_notebook(notebook.Top)
    notebook.did_add       += lambda win: nb.CreateTab(win, preview_type())
    notebook.did_remove    += nb.DestroyTab
    notebook.did_rearrange += nb.RearrangeTab
    notebook.did_activate  += nb.SetTabActive
    notebook.did_seticon   += lambda page, icon: nb.SetTabIcon(page, icon) if icon is not None else wx.NullBitmap
    notebook.did_settitle  += nb.SetTabTitle

    if False: # debugging
        def foo(s):
            def handler(*a, **k):
                print '#'*80
                print notebook, s
                print a, k
            return handler

        notebook.did_add       += foo('did_add')
        notebook.did_remove    += foo('did_remove')
        notebook.did_rearrange += foo('did_rearrange')