import gtk import hildon def show_new_window(widget): win = hildon.StackableWindow() # ... configure new window win.show_all() def main(): program = hildon.Program.get_instance() win = hildon.StackableWindow() win.set_title("Main window") # ... add some widgets to the window button = hildon.Button(gtk.HILDON_SIZE_AUTO_WIDTH | gtk.HILDON_SIZE_FINGER_HEIGHT, hildon.BUTTON_ARRANGEMENT_VERTICAL) button.set_text("Some title", "some value") image = gtk.image_new_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_BUTTON) button.set_image(image) button.set_image_position(gtk.POS_RIGHT) button.connect("clicked", show_new_window) win.add(button) win.connect("destroy", gtk.main_quit, None) # This call show the window and also add the window to the stack win.show_all() gtk.main() if __name__ == "__main__": main()