Fix layout in Plugins Window
This commit is contained in:
parent
b9ae874a32
commit
80de2e45c6
4 changed files with 25 additions and 28 deletions
|
@ -45,14 +45,16 @@
|
||||||
<property name="position">250</property>
|
<property name="position">250</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="vbox6">
|
<object class="GtkBox" id="vbox6">
|
||||||
|
<property name="width_request">150</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="border_width">6</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">6</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="border_width">6</property>
|
|
||||||
<property name="hscrollbar_policy">never</property>
|
<property name="hscrollbar_policy">never</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkTreeView" id="installed_plugins_treeview">
|
<object class="GtkTreeView" id="installed_plugins_treeview">
|
||||||
|
@ -71,34 +73,25 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkAspectFrame" id="aspectframe1">
|
<object class="GtkButton" id="install_plugin_button">
|
||||||
|
<property name="label" translatable="yes">Install from zip</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="label_xalign">0</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="shadow_type">none</property>
|
<property name="halign">start</property>
|
||||||
<property name="xalign">0</property>
|
<property name="image">image1</property>
|
||||||
<child>
|
<signal name="clicked" handler="on_install_plugin_button_clicked" swapped="no"/>
|
||||||
<object class="GtkButton" id="install_plugin_button">
|
|
||||||
<property name="label" translatable="yes">Install from zip</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="image">image1</property>
|
|
||||||
<signal name="clicked" handler="on_install_plugin_button_clicked" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">False</property>
|
||||||
<property name="padding">5</property>
|
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="resize">False</property>
|
<property name="resize">False</property>
|
||||||
<property name="shrink">True</property>
|
<property name="shrink">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -112,9 +105,9 @@
|
||||||
<object class="GtkLabel" id="plugin_name_label">
|
<object class="GtkLabel" id="plugin_name_label">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="label" translatable="yes">&lt;empty&gt;</property>
|
<property name="label" translatable="yes">&lt;empty&gt;</property>
|
||||||
<property name="selectable">True</property>
|
<property name="selectable">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -146,9 +139,9 @@
|
||||||
<object class="GtkLabel" id="plugin_version_label">
|
<object class="GtkLabel" id="plugin_version_label">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="label"><empty></property>
|
<property name="label"><empty></property>
|
||||||
<property name="selectable">True</property>
|
<property name="selectable">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
|
@ -172,8 +165,8 @@
|
||||||
<object class="GtkLabel" id="label4">
|
<object class="GtkLabel" id="label4">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="yalign">0</property>
|
|
||||||
<property name="label" translatable="yes">Authors:</property>
|
<property name="label" translatable="yes">Authors:</property>
|
||||||
|
<property name="yalign">0</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
@ -185,12 +178,12 @@
|
||||||
<object class="GtkLabel" id="plugin_authors_label">
|
<object class="GtkLabel" id="plugin_authors_label">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="yalign">0</property>
|
|
||||||
<property name="label"><empty></property>
|
<property name="label"><empty></property>
|
||||||
<property name="wrap_mode">word-char</property>
|
<property name="wrap_mode">word-char</property>
|
||||||
<property name="selectable">True</property>
|
<property name="selectable">True</property>
|
||||||
<property name="ellipsize">end</property>
|
<property name="ellipsize">end</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
|
|
|
@ -4875,7 +4875,8 @@ class AvatarChooserDialog(ImageChooserDialog):
|
||||||
|
|
||||||
|
|
||||||
class ArchiveChooserDialog(FileChooserDialog):
|
class ArchiveChooserDialog(FileChooserDialog):
|
||||||
def __init__(self, on_response_ok=None, on_response_cancel=None):
|
def __init__(self, on_response_ok=None, on_response_cancel=None,
|
||||||
|
transient_for=None):
|
||||||
|
|
||||||
def on_ok(widget, callback):
|
def on_ok(widget, callback):
|
||||||
'''check if file exists and call callback'''
|
'''check if file exists and call callback'''
|
||||||
|
@ -4899,7 +4900,8 @@ class ArchiveChooserDialog(FileChooserDialog):
|
||||||
default_response=Gtk.ResponseType.OK,
|
default_response=Gtk.ResponseType.OK,
|
||||||
current_folder=path,
|
current_folder=path,
|
||||||
on_response_ok=(on_ok, on_response_ok),
|
on_response_ok=(on_ok, on_response_ok),
|
||||||
on_response_cancel=on_response_cancel)
|
on_response_cancel=on_response_cancel,
|
||||||
|
transient_for=transient_for)
|
||||||
|
|
||||||
if on_response_cancel:
|
if on_response_cancel:
|
||||||
self.connect('destroy', on_response_cancel)
|
self.connect('destroy', on_response_cancel)
|
||||||
|
|
|
@ -69,6 +69,7 @@ class PluginsWindow(object):
|
||||||
setattr(self, widget_name, self.xml.get_object(widget_name))
|
setattr(self, widget_name, self.xml.get_object(widget_name))
|
||||||
|
|
||||||
self.plugin_description_textview = HtmlTextView()
|
self.plugin_description_textview = HtmlTextView()
|
||||||
|
self.plugin_description_textview.set_wrap_mode(Gtk.WrapMode.WORD)
|
||||||
sw = self.xml.get_object('scrolledwindow2')
|
sw = self.xml.get_object('scrolledwindow2')
|
||||||
sw.add(self.plugin_description_textview)
|
sw.add(self.plugin_description_textview)
|
||||||
self.installed_plugins_model = Gtk.ListStore(object, str, bool, bool,
|
self.installed_plugins_model = Gtk.ListStore(object, str, bool, bool,
|
||||||
|
@ -303,7 +304,8 @@ class PluginsWindow(object):
|
||||||
sel = self.installed_plugins_treeview.get_selection()
|
sel = self.installed_plugins_treeview.get_selection()
|
||||||
sel.select_iter(iter_)
|
sel.select_iter(iter_)
|
||||||
|
|
||||||
self.dialog = ArchiveChooserDialog(on_response_ok=_try_install)
|
self.dialog = ArchiveChooserDialog(
|
||||||
|
on_response_ok=_try_install, transient_for=self.window)
|
||||||
|
|
||||||
|
|
||||||
class GajimPluginConfigDialog(Gtk.Dialog):
|
class GajimPluginConfigDialog(Gtk.Dialog):
|
||||||
|
|
|
@ -447,7 +447,7 @@ class PluginManager(metaclass=Singleton):
|
||||||
|
|
||||||
# read metadata from manifest.ini
|
# read metadata from manifest.ini
|
||||||
conf.remove_section('info')
|
conf.remove_section('info')
|
||||||
conf_file = open(manifest_path)
|
conf_file = open(manifest_path, encoding='utf-8')
|
||||||
conf.read_file(conf_file)
|
conf.read_file(conf_file)
|
||||||
conf_file.close()
|
conf_file.close()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue