#!/usr/bin/python
import gtk, gobject

class TestWindow (gtk.Window):
	def __init__ (self):
		gtk.Window.__init__ (self)
		self.set_title ("Test Window")
		child = gtk.Button ("Button")
		child.show()
		self.add (child)
		self.set_default_size (300, 300)

main_window = TestWindow()
popup_window = TestWindow()
popup_window.set_transient_for (main_window)
popup_window.set_type_hint (gtk.gdk.WINDOW_TYPE_HINT_DIALOG)

def popup_cb():
	popup_window.show()
	return True

def quit_cb():
	gtk.main_quit()
	return True

gobject.timeout_add (2000, popup_cb)
gobject.timeout_add (4000, quit_cb)

main_window.show()
gtk.main()
