Commit a41a3e91 authored by Philipp Hörist's avatar Philipp Hörist

[plugin_installer] Refactor config window

- Remove Server URL entry field
- Dont use deprecated widgets anymore
parent b520fa80
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkWindow" id="ConfigWindow">
<property name="can_focus">False</property>
<child>
<object class="GtkGrid" id="config_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<child>
<object class="GtkCheckButton" id="check_update">
<property name="label" translatable="yes">Check update after start</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="focus_on_click">False</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_check_update_toggled" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
......@@ -27,7 +55,62 @@
<property name="can_focus">True</property>
<property name="search_column">1</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Plugin</property>
<property name="expand">True</property>
<child>
<object class="GtkCellRendererPixbuf" id="pixbufrenderer"/>
<attributes>
<attribute name="pixbuf">0</attribute>
</attributes>
</child>
<child>
<object class="GtkCellRendererText" id="plugintextrenderer"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Installed</property>
<child>
<object class="GtkCellRendererText" id="versiontextrenderer"/>
<attributes>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Available</property>
<child>
<object class="GtkCellRendererText" id="availabletextrenderer"/>
<attributes>
<attribute name="text">4</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Install /
Upgrade</property>
<property name="alignment">0.5</property>
<child>
<object class="GtkCellRendererToggle" id="togglerenderer">
<signal name="toggled" handler="available_plugins_toggled_cb" swapped="no"/>
</object>
<attributes>
<attribute name="active">5</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
......@@ -179,9 +262,9 @@
<object class="GtkLinkButton" id="plugin_homepage_linkbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<property name="xalign">0</property>
</object>
<packing>
......@@ -332,69 +415,4 @@
</object>
</child>
</object>
<object class="GtkWindow" id="window2">
<property name="can_focus">False</property>
<child>
<object class="GtkVBox" id="hbox111">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<child>
<object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">FTP Server:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="ftp_server">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="check_update">
<property name="label" translatable="yes">Check update after start</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="focus_on_click">False</property>
<property name="xalign">0.5</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_check_update_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
......@@ -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()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment