changeset 662495872f61 in /home/hg/repos/gajim-plugins
author: lovetox <forenjunkie(a)chelo.at>
branches: gtk3
details:gajim-plugins?cmd=changeset;node=662495872f61
description: Harmonize layout of Installed/Available tab
diffstat:
plugin_installer/config_dialog.ui | 117 +++++++++++++++++++++-------------
plugin_installer/plugin_installer.py | 34 +++++----
2 files changed, 92 insertions(+), 59 deletions(-)
diffs (truncated from 335 to 300 lines):
diff -r 2abf9d5ec2bb -r 662495872f61 plugin_installer/config_dialog.ui
--- a/plugin_installer/config_dialog.ui Tue Sep 27 00:35:59 2016 +0200
+++ b/plugin_installer/config_dialog.ui Thu Oct 06 00:06:59 2016 +0200
@@ -6,8 +6,7 @@
<property name="can_focus">False</property>
<child>
<object class="GtkHPaned" id="hpaned2">
- <property name="width_request">1024</property>
- <property name="height_request">480</property>
+ <property name="width_request">800</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position">340</property>
@@ -57,19 +56,22 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox4">
+ <object class="GtkBox" id="vbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">5</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="plugin_name_label1">
+ <object class="GtkLabel" id="plugin_name_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label"><empty></property>
+ <property name="label" translatable="yes">&lt;empty&gt;</property>
<property name="selectable">True</property>
- <property name="ellipsize">end</property>
<property name="xalign">0</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -78,15 +80,15 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox8">
+ <object class="GtkBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label8">
+ <object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Authors:</property>
+ <property name="label" translatable="yes">Version:</property>
</object>
<packing>
<property name="expand">False</property>
@@ -95,13 +97,11 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="plugin_authors_label1">
+ <object class="GtkLabel" id="plugin_version_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xpad">6</property>
<property name="label"><empty></property>
<property name="selectable">True</property>
- <property name="ellipsize">end</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -118,11 +118,53 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox9">
+ <object class="GtkBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Authors:</property>
+ <property name="yalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="plugin_authors_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"><empty></property>
+ <property name="wrap_mode">word-char</property>
+ <property name="selectable">True</property>
+ <property name="ellipsize">end</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</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">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="hbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkLabel" id="label9">
+ <object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Homepage:</property>
@@ -134,9 +176,7 @@
</packing>
</child>
<child>
- <object class="GtkLinkButton" id="plugin_homepage_linkbutton1">
- <property name="label">button</property>
- <property name="use_action_appearance">False</property>
+ <object class="GtkLinkButton" id="plugin_homepage_linkbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -154,19 +194,20 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox5">
+ <object class="GtkBox" id="vbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkHBox" id="hbox10">
+ <object class="GtkBox" id="hbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkLabel" id="label10">
+ <object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Description:</property>
@@ -178,18 +219,7 @@
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
+ <placeholder/>
</child>
</object>
<packing>
@@ -202,6 +232,7 @@
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
<child>
<placeholder/>
</child>
@@ -216,7 +247,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
@@ -236,11 +267,10 @@
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked" handler="on_inslall_upgrade_clicked" swapped="no"/>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkHBox" id="hbox6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -289,13 +319,13 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
</object>
<packing>
<property name="resize">True</property>
- <property name="shrink">True</property>
+ <property name="shrink">False</property>
</packing>
</child>
</object>
@@ -307,15 +337,17 @@
<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="label" translatable="yes">FTP Server:</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -379,9 +411,6 @@
<property name="position">2</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
</object>
</child>
</object>
diff -r 2abf9d5ec2bb -r 662495872f61 plugin_installer/plugin_installer.py
--- a/plugin_installer/plugin_installer.py Tue Sep 27 00:35:59 2016 +0200
+++ b/plugin_installer/plugin_installer.py Thu Oct 06 00:06:59 2016 +0200
@@ -203,10 +203,10 @@
self.page_num = self.notebook.append_page(self.hpaned,
Gtk.Label.new(_('Available')))
- widgets_to_extract = ('plugin_name_label1',
- 'available_treeview', 'progressbar', 'inslall_upgrade_button',
- 'plugin_authors_label1', 'plugin_authors_label1',
- 'plugin_homepage_linkbutton1')
+ widgets_to_extract = (
+ 'plugin_name_label', 'available_treeview', 'progressbar',
+ 'inslall_upgrade_button', 'plugin_authors_label',
+ 'plugin_homepage_linkbutton', 'plugin_version_label')
for widget_name in widgets_to_extract:
setattr(self, widget_name, self.xml.get_object(widget_name))
@@ -266,6 +266,7 @@
self._clear_available_plugin_info()
self.plugin_description_textview = HtmlTextView()
+ self.plugin_description_textview.set_wrap_mode(Gtk.WrapMode.WORD)
sw = self.xml.get_object('scrolledwindow1')
sw.add(self.plugin_description_textview)
@@ -375,19 +376,21 @@
model, iter = treeview_selection.get_selected()
self.xml.get_object('scrolledwindow1').get_children()[0].destroy()
self.plugin_description_textview = HtmlTextView()
+ self.plugin_description_textview.set_wrap_mode(Gtk.WrapMode.WORD)
sw = self.xml.get_object('scrolledwindow1')
sw.add(self.plugin_description_textview)
sw.show_all()
if iter:
- self.plugin_name_label1.set_text(model.get_value(iter, C_NAME))
- self.plugin_authors_label1.set_text(model.get_value(iter, C_AUTHORS))