[pygtk] Setting skip_taskbar_hint under Windows

ilya korcdmk gm.illifant at gmail.com
Sun Jun 14 03:33:55 WST 2009


Is it possible to make a window not to be viewed in taskbar when running
under Windows? Just calling gtk.Window.skip_taskbar_hint(True) works fine in
my XFCE, but makes nothing under Win. I got the same effect with
gtk.gdk.window.set_skip_taskbar_hint(True).

Here is an example of what I tried to do:

#!/usr/bin/env python
# skiptest.pyw
import gtk

class skiptest():
    def __init__(self):
        self.window = gtk.Window()
        self.window.connect("destroy", gtk.main_quit)
        vbox = gtk.VBox(True, 5)
        vbox.set_border_width(5)

        button_taskbar = gtk.Button("Skip Taskbar")
        button_taskbar.connect("clicked", self.taskbar_cb)

        button_pager = gtk.Button("Skip Pager")
        button_pager.connect("clicked", self.pager_cb)

        vbox.pack_start(button_taskbar)
        vbox.pack_start(button_pager)
        self.window.add(vbox)
        self.window.show_all()

    def taskbar_cb(self, button):
        current = self.window.get_skip_taskbar_hint()
        self.window.set_skip_taskbar_hint(not current)
        print "Skip Taskbar:", not current

    def pager_cb(self, button):
        current = self.window.get_skip_pager_hint()
        self.window.set_skip_pager_hint(not current)
        print "Skip Pager:", not current

if __name__ == '__main__':
    skiptest()
    gtk.main()

I have gtk+ 2.16.1, pygtk 2.14.1, python 2.5.4-2 in Debian testing and
gtk+ 2.16.2, pygtk 2.12.1 (the latest one at ftp.gnome.org), python 2.5.4 in
Windows
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20090613/222f4885/attachment.htm 


More information about the pygtk mailing list