Fix layout in Plugins Window
This commit is contained in:
parent
b9ae874a32
commit
80de2e45c6
|
@ -45,14 +45,16 @@
|
|||
<property name="position">250</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox6">
|
||||
<property name="width_request">150</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="installed_plugins_treeview">
|
||||
|
@ -71,34 +73,25 @@
|
|||
</packing>
|
||||
</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="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<property name="xalign">0</property>
|
||||
<child>
|
||||
<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>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="image">image1</property>
|
||||
<signal name="clicked" handler="on_install_plugin_button_clicked" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">5</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">False</property>
|
||||
<property name="shrink">True</property>
|
||||
<property name="shrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -112,9 +105,9 @@
|
|||
<object class="GtkLabel" id="plugin_name_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">&lt;empty&gt;</property>
|
||||
<property name="selectable">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
|
@ -146,9 +139,9 @@
|
|||
<object class="GtkLabel" id="plugin_version_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label"><empty></property>
|
||||
<property name="selectable">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
@ -172,8 +165,8 @@
|
|||
<object class="GtkLabel" id="label4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="label" translatable="yes">Authors:</property>
|
||||
<property name="yalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -185,12 +178,12 @@
|
|||
<object class="GtkLabel" id="plugin_authors_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</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>
|
||||
|
|
|
@ -4875,7 +4875,8 @@ class AvatarChooserDialog(ImageChooserDialog):
|
|||
|
||||
|
||||
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):
|
||||
'''check if file exists and call callback'''
|
||||
|
@ -4899,7 +4900,8 @@ class ArchiveChooserDialog(FileChooserDialog):
|
|||
default_response=Gtk.ResponseType.OK,
|
||||
current_folder=path,
|
||||
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:
|
||||
self.connect('destroy', on_response_cancel)
|
||||
|
|
|
@ -69,6 +69,7 @@ class PluginsWindow(object):
|
|||
setattr(self, widget_name, self.xml.get_object(widget_name))
|
||||
|
||||
self.plugin_description_textview = HtmlTextView()
|
||||
self.plugin_description_textview.set_wrap_mode(Gtk.WrapMode.WORD)
|
||||
sw = self.xml.get_object('scrolledwindow2')
|
||||
sw.add(self.plugin_description_textview)
|
||||
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.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):
|
||||
|
|
|
@ -447,7 +447,7 @@ class PluginManager(metaclass=Singleton):
|
|||
|
||||
# read metadata from manifest.ini
|
||||
conf.remove_section('info')
|
||||
conf_file = open(manifest_path)
|
||||
conf_file = open(manifest_path, encoding='utf-8')
|
||||
conf.read_file(conf_file)
|
||||
conf_file.close()
|
||||
|
||||
|
|
Loading…
Reference in New Issue