Philipp Hörist pushed to branch master at gajim / gajim
Commits:
a988d2e2 by Daniel Brötzmann at 2019-03-24T14:33:03Z
Flatpak: Disable install from ZIP
- - - - -
2 changed files:
- gajim/data/gui/plugins_window.ui
- gajim/plugins/gui.py
Changes:
=====================================
gajim/data/gui/plugins_window.ui
=====================================
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.0 -->
+<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkWindow" id="plugins_window">
@@ -13,6 +13,9 @@
<property name="type_hint">dialog</property>
<signal name="destroy" handler="on_plugins_window_destroy" swapped="no"/>
<signal name="key-press-event" handler="on_key_press_event" swapped="no"/>
+ <child type="titlebar">
+ <placeholder/>
+ </child>
<child>
<object class="GtkNotebook" id="plugins_notebook">
<property name="visible">True</property>
@@ -232,6 +235,7 @@
<property name="wrap">True</property>
<property name="wrap_mode">word-char</property>
<property name="selectable">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -375,9 +379,6 @@
</child>
</object>
</child>
- <child type="titlebar">
- <placeholder/>
- </child>
</object>
<object class="GtkTextBuffer" id="textbuffer1">
<property name="text" translatable="yes">Plug-in decription should be
displayed here. This text will be erased during PluginsWindow
initialization.</property>
=====================================
gajim/plugins/gui.py
=====================================
@@ -32,6 +32,7 @@ from gi.repository import Gdk
from gajim.common import app
from gajim.common import configpaths
from gajim.common.exceptions import PluginsystemError
+from gajim.common.helpers import launch_browser_mailer
from gajim.plugins.helpers import log_calls
from gajim.plugins.helpers import GajimPluginActivateException
@@ -65,14 +66,21 @@ class PluginsWindow:
widgets_to_extract = ('plugins_notebook', 'plugin_name_label',
'plugin_version_label', 'plugin_authors_label',
- 'plugin_homepage_linkbutton', 'uninstall_plugin_button',
- 'configure_plugin_button', 'installed_plugins_treeview',
- 'available_text', 'available_text_label')
+ 'plugin_homepage_linkbutton', 'install_plugin_button',
+ 'uninstall_plugin_button', 'configure_plugin_button',
+ 'installed_plugins_treeview', 'available_text',
+ 'available_text_label')
for widget_name in widgets_to_extract:
setattr(self, widget_name, builder.get_object(widget_name))
self.plugin_description_textview = builder.get_object('description')
+
+ # Disable 'Install from ZIP' for Flatpak installs
+ if app.is_flatpak():
+ self.install_plugin_button.set_tooltip_text(
+ _('Click to view Gajim\'s wiki page on how to install plugins
in Flatpak.'))
+
self.installed_plugins_model = Gtk.ListStore(object, str, bool, bool,
GdkPixbuf.Pixbuf)
self.installed_plugins_treeview.set_model(self.installed_plugins_model)
@@ -241,6 +249,10 @@ class PluginsWindow:
@log_calls('PluginsWindow')
def on_install_plugin_button_clicked(self, widget):
+ if app.is_flatpak():
+ launch_browser_mailer('url',
'https://dev.gajim.org/gajim/gajim/wikis/help/flathub')
+ return
+
def show_warn_dialog():
text = _('Archive is malformed')
dialog = WarningDialog(text, '', transient_for=self.window)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/a988d2e25088fd77f48b292dd12f0f7b143a1660
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/a988d2e25088fd77f48b292dd12f0f7b143a1660
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits