Commit 3f284e85 authored by Philipp Hörist's avatar Philipp Hörist

Harmonize layout of Installed/Available tab

parent ec72d03e
......@@ -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">&lt;empty&gt;</property>
<property name="label" translatable="yes">&amp;lt;empty&amp;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,54 @@
</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="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Version:</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_version_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">&lt;empty&gt;</property>
<property name="selectable">True</property>
<property name="xalign">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">1</property>
</packing>
</child>
<child>
<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="label8">
<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>
......@@ -95,14 +136,15 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="plugin_authors_label1">
<object class="GtkLabel" id="plugin_authors_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xpad">6</property>
<property name="label">&lt;empty&gt;</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>
......@@ -114,15 +156,15 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox9">
<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>
......
......@@ -203,10 +203,10 @@ class PluginInstaller(GajimPlugin):
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 @@ class PluginInstaller(GajimPlugin):
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 @@ class PluginInstaller(GajimPlugin):
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))
self.plugin_homepage_linkbutton1.set_uri(model.get_value(iter,
self.plugin_name_label.set_text(model.get_value(iter, C_NAME))
self.plugin_version_label.set_text(model.get_value(iter, C_VERSION))
self.plugin_authors_label.set_text(model.get_value(iter, C_AUTHORS))
self.plugin_homepage_linkbutton.set_uri(model.get_value(iter,
C_HOMEPAGE))
self.plugin_homepage_linkbutton1.set_label(model.get_value(iter,
self.plugin_homepage_linkbutton.set_label(model.get_value(iter,
C_HOMEPAGE))
label = self.plugin_homepage_linkbutton1.get_children()[0]
label = self.plugin_homepage_linkbutton.get_children()[0]
label.set_ellipsize(Pango.EllipsizeMode.END)
self.plugin_homepage_linkbutton1.set_property('sensitive', True)
self.plugin_homepage_linkbutton.set_property('sensitive', True)
desc = _(model.get_value(iter, C_DESCRIPTION))
if not desc.startswith('<body '):
desc = '<body xmlns=\'http://www.w3.org/1999/xhtml\'>' + \
......@@ -400,11 +403,12 @@ class PluginInstaller(GajimPlugin):
self._clear_available_plugin_info()
def _clear_available_plugin_info(self):
self.plugin_name_label1.set_text('')
self.plugin_authors_label1.set_text('')
self.plugin_homepage_linkbutton1.set_uri('')
self.plugin_homepage_linkbutton1.set_label('')
self.plugin_homepage_linkbutton1.set_property('sensitive', False)
self.plugin_name_label.set_text('')
self.plugin_version_label.set_text('')
self.plugin_authors_label.set_text('')
self.plugin_homepage_linkbutton.set_uri('')
self.plugin_homepage_linkbutton.set_label('')
self.plugin_homepage_linkbutton.set_property('sensitive', False)
def scan_dir_for_plugin(self, path):
plugins_found = []
......
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