import gtk from gtk import glade class LlxcfgMsadPasswordReminder: def __init__(self): # Connect the glade self.xml = glade.XML("llxcfg-msad-password-reminder.glade", None, None) # Show first window self.window=self.xml.get_widget("dialog_main") self.window.show_all() # Create dictionary of signals dic = { "on_button_change_clicked" : self.on_button_change_clicked, "on_button_continue_clicked" : self.on_button_continue_clicked, "on_button_newpassword_cancel_clicked" : self.on_button_newpassword_cancel_clicked, "on_button_newpassword_apply_clicked" : self.on_button_newpassword_apply_clicked, "destroy" : self.on_destroy } self.xml.signal_autoconnect(dic) def on_destroy(self,widget): self.window.destroy() gtk.main_quit() def on_button_change_clicked(self, widget): self.window=self.xml.get_widget("dialog_password") self.window.show_all() def on_button_continue_clicked(self,widget): self.window.destroy() gtk.main_quit() def on_button_newpassword_cancel_clicked(self,widget): self.window.destroy() gtk.main_quit() def on_button_newpassword_apply_clicked(self,widget): print "Vamos a cambiar el password.....no es ningun farol" if __name__ == "__main__": LlxcfgMsadPasswordReminder = LlxcfgMsadPasswordReminder() gtk.main()