def NewPreferencesP2pvpnmgrDialog(): """NewPreferencesP2pvpnmgrDialog - returns a fully instantiated PreferencesP2pvpnmgrDialog object. Use this function rather than creating a PreferencesP2pvpnmgrDialog instance directly. """ #look for the ui file that describes the ui ui_filename = os.path.join(getdatapath(), 'ui', 'PreferencesP2pvpnmgrDialog.ui') if not os.path.exists(ui_filename): ui_filename = None builder = gtk.Builder() builder.add_from_file(ui_filename) dialog = builder.get_object("preferences_p2pvpnmgr_dialog") dialog.finish_initializing(builder) return dialog
def NewNetworkdetailDialog(database, _id=None): """NewNetworkdetailDialog - returns a fully instantiated dialog-camel_case_nameDialog object. Use this function rather than creating NetworkdetailDialog instance directly. """ #look for the ui file that describes the ui ui_filename = os.path.join(getdatapath(), 'ui', 'NetworkdetailDialog.ui') if not os.path.exists(ui_filename): ui_filename = None builder = gtk.Builder() builder.add_from_file(ui_filename) dialog = builder.get_object("networkdetail_dialog") dialog.finish_initializing(builder) dialog.database = database if _id is not None: dialog.load_from_couch(_id) return dialog