def NewPreferencesLxproxyDialog(): """NewPreferencesLxproxyDialog - returns a fully instantiated PreferencesLxproxyDialog object. Use this function rather than creating a PreferencesLxproxyDialog instance directly. """ #look for the ui file that describes the ui #ui_filename = os.path.join(os.curdir(),'PreferencesLxproxyDialog.ui') #if not os.path.exists(ui_filename): # ui_filename = None builder = gtk.Builder() builder.add_from_file(getdatapath('LxproxyWindow.ui')) dialog = builder.get_object("preferences_lxproxy_dialog") dialog.finish_initializing(builder) return dialog
def NewLxproxyWindow(): """NewLxproxyWindow - returns a fully instantiated LxproxyWindow object. Use this function rather than creating a LxproxyWindow directly. """ # look for the ui file that describes the ui # ui_filename = os.path.join(getdatapath(), 'ui', 'lxproxy', 'LxproxyWindow.ui') # if not os.path.exists(ui_filename): # ui_filename = None # builder = gtk.Builder() builder.add_from_file(getdatapath("LxproxyWindow.ui")) window = builder.get_object("lxproxy_window") window.finish_initializing(builder) return window