#!/usr/bin/env python


import sys

import gtk
import glib


def test_present(status_icon, window):
    sys.stdout.write('presenting window\n')
    sys.stdout.flush()
    window.present()


if __name__ == '__main__':
    window = gtk.Window()
    window.show()

    statusicon = gtk.StatusIcon()
    statusicon.connect('activate', test_present, window)
    statusicon.set_from_stock(gtk.STOCK_CANCEL)
    statusicon.set_visible(True)

    gtk.main()
