From a41a3e915b2bc03d18a93cbff64d22f10f94d43a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Mon, 20 Feb 2017 17:43:18 +0100 Subject: [plugin_installer] Refactor config window - Remove Server URL entry field - Dont use deprecated widgets anymore --- plugin_installer/config_dialog.ui | 156 +++++++++++++++++++---------------- plugin_installer/plugin_installer.py | 16 +--- 2 files changed, 91 insertions(+), 81 deletions(-) (limited to 'plugin_installer') diff --git a/plugin_installer/config_dialog.ui b/plugin_installer/config_dialog.ui index 01a796c..dca05f7 100644 --- a/plugin_installer/config_dialog.ui +++ b/plugin_installer/config_dialog.ui @@ -1,7 +1,35 @@ - + - + + + False + + + True + False + 12 + 12 + 12 + 12 + + + Check update after start + True + False + False + False + True + + + + 0 + 0 + + + + + False @@ -27,7 +55,62 @@ True 1 - + + + + + Plugin + True + + + + 0 + + + + + + 2 + + + + + + + Installed + + + + 3 + + + + + + + Available + + + + 4 + + + + + + + Install / +Upgrade + 0.5 + + + + + + 5 + + + @@ -179,9 +262,9 @@ True True + False True none - False 0 @@ -332,69 +415,4 @@ - - False - - - True - False - 6 - - - True - False - 6 - - - True - False - FTP Server: - 0 - - - False - True - 0 - - - - - True - True - - - - True - True - 1 - - - - - False - True - 0 - - - - - Check update after start - False - True - False - False - False - 0.5 - True - - - - False - True - 1 - - - - - diff --git a/plugin_installer/plugin_installer.py b/plugin_installer/plugin_installer.py index 7b9fb71..ebf9540 100644 --- a/plugin_installer/plugin_installer.py +++ b/plugin_installer/plugin_installer.py @@ -629,26 +629,18 @@ class Ftp(threading.Thread): class PluginInstallerPluginConfigDialog(GajimPluginConfigDialog): def init(self): - self.Gtk_BUILDER_FILE_PATH = self.plugin.local_file_path( - 'config_dialog.ui') + glade_file_path = self.plugin.local_file_path('config_dialog.ui') self.xml = Gtk.Builder() self.xml.set_translation_domain('gajim_plugins') - self.xml.add_objects_from_file(self.Gtk_BUILDER_FILE_PATH, ['hbox111']) - hbox = self.xml.get_object('hbox111') - self.get_child().pack_start(hbox, True, True, 0) + self.xml.add_objects_from_file(glade_file_path, ['config_grid']) + grid = self.xml.get_object('config_grid') + self.get_child().pack_start(grid, True, True, 0) self.xml.connect_signals(self) - self.connect('hide', self.on_hide) def on_run(self): - widget = self.xml.get_object('http_server') - widget.set_text(str(self.plugin.config['http_server'])) self.xml.get_object('check_update').set_active( self.plugin.config['check_update']) - def on_hide(self, widget): - widget = self.xml.get_object('ftp_server') - self.plugin.config['ftp_server'] = widget.get_text() - def on_check_update_toggled(self, widget): self.plugin.config['check_update'] = widget.get_active() -- cgit v1.2.3