def NewPreferencesGcraziestDialog(): """NewPreferencesGcraziestDialog - returns a fully instantiated PreferencesGcraziestDialog object. Use this function rather than creating a PreferencesGcraziestDialog instance directly. """ # look for the ui file that describes the ui ui_filename = os.path.join(getdatapath(), "ui", "PreferencesGcraziestDialog.ui") if not os.path.exists(ui_filename): ui_filename = None builder = gtk.Builder() builder.add_from_file(ui_filename) # grab GUI elements dialog = builder.get_object("preferences_gcraziest_dialog") dialog.minlength = builder.get_object("minlength") dialog.maxlength = builder.get_object("maxlength") dialog.blanksymbol = builder.get_object("blanksymbol") dialog.aspelldictionary = builder.get_object("aspelldictionary") dialog.dictionarycommand = builder.get_object("dictionarycommand") dialog.filedictionary = builder.get_object("filedictionary") dialog.dictionaryfile = builder.get_object("dictionaryfile") dialog.aspellcommand = builder.get_object("aspellcommand") dialog.customalphabet = builder.get_object("customalphabet") dialog.customalphabetfile = builder.get_object("customalphabetfile") dialog.dicthost = builder.get_object("dicthost") dialog.dictport = builder.get_object("dictport") dialog.databases = builder.get_object("databases") dialog.showdefinitions = builder.get_object("showdefinitions") dialog.serverstatus = builder.get_object("serverstatus") dialog.finish_initializing(builder) return dialog
def NewAboutGcraziestDialog(version): """NewAboutGcraziestDialog - returns a fully instantiated AboutGcraziestDialog object. Use this function rather than creating a AboutGcraziestDialog instance directly. """ #look for the ui file that describes the ui ui_filename = os.path.join(getdatapath(), 'ui', 'AboutGcraziestDialog.ui') if not os.path.exists(ui_filename): ui_filename = None builder = gtk.Builder() builder.add_from_file(ui_filename) dialog = builder.get_object("about_gcraziest_dialog") dialog.finish_initializing(builder, version) return dialog