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

class Window (gtk.Window):
	def __init__ (self, parent):
		gtk.Window.__init__ (self)
		self.set_title ("window")
		child = gtk.Entry()
		child.show()
		self.add (child)

		if parent == None:
			self.set_default_size (300, 300)
		else:
			self.set_transient_for (parent)
			self.set_type_hint (gtk.gdk.WINDOW_TYPE_HINT_DIALOG)
			self.set_default_size (250, 250)
			#self.set_focus_on_map (False)

#gtk.window_set_auto_startup_notification (False)

main_window = Window (None)

def popup_cb():
	popup_window = Window (main_window)
	popup_window.show()
	return True

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

gobject.timeout_add (5000, popup_cb)
gobject.timeout_add (10000, quit_cb)

main_window.show()
gtk.main()

