
import gtk

def show_dialog(button, window):
    dialog = gtk.Dialog()
    dialog.set_title("Testing Dialog")

    label = gtk.Label("Testing Label...")
    label.show()
    dialog.vbox.add(label)

    dialog.set_transient_for(window)
    dialog.present()
    dialog.window.focus()

def main():
    window = gtk.Window()
    window.set_title("Testing Window")

    button = gtk.Button(label="Open Dialog")
    button.connect('clicked', show_dialog, window)
    button.show()

    window.add(button)
    window.present()

    gtk.main()

if __name__ == "__main__":
    main()
