diff --git a/data/gui/plugins_window.ui b/data/gui/plugins_window.ui index 3c416be67..9f362620f 100644 --- a/data/gui/plugins_window.ui +++ b/data/gui/plugins_window.ui @@ -296,23 +296,12 @@ - + True True in - - True - False - True - 6 - False - word - 6 - 6 - 1 - textbuffer1 - + diff --git a/src/plugins/gui.py b/src/plugins/gui.py index c9ab6abe6..802aff618 100644 --- a/src/plugins/gui.py +++ b/src/plugins/gui.py @@ -34,6 +34,7 @@ import os import gtkgui_helpers from dialogs import WarningDialog, YesNoDialog, ArchiveChooserDialog +from htmltextview import HtmlTextView from common import gajim from plugins.helpers import log_calls, log from conversation_textview import ConversationTextview @@ -61,13 +62,15 @@ class PluginsWindow(object): widgets_to_extract = ('plugins_notebook', 'plugin_name_label', 'plugin_version_label', 'plugin_authors_label', - 'plugin_homepage_linkbutton', 'plugin_description_textview', - 'uninstall_plugin_button', 'configure_plugin_button', - 'installed_plugins_treeview') + 'plugin_homepage_linkbutton', 'uninstall_plugin_button', + 'configure_plugin_button', 'installed_plugins_treeview') for widget_name in widgets_to_extract: setattr(self, widget_name, self.xml.get_object(widget_name)) + self.plugin_description_textview = HtmlTextView() + sw = self.xml.get_object('scrolledwindow2') + sw.add(self.plugin_description_textview) self.installed_plugins_model = Gtk.ListStore(object, str, bool, bool, GdkPixbuf.Pixbuf) self.installed_plugins_treeview.set_model(self.installed_plugins_model) @@ -146,15 +149,21 @@ class PluginsWindow(object): label.set_ellipsize(Pango.EllipsizeMode.END) self.plugin_homepage_linkbutton.set_property('sensitive', True) + sw = self.xml.get_object('scrolledwindow2') + old_tv = sw.get_children()[0] + old_tv.destroy() + self.plugin_description_textview = HtmlTextView() + sw.add(self.plugin_description_textview) + sw.show_all() txt = plugin.description + txt.replace('', '') if plugin.available_text: - txt += '\n\n' + _('Warning: %s') % plugin.available_text + txt += '

' + _('Warning: %s') % plugin.available_text if not txt.startswith('' + \ - txt + ' ' - txt = txt.replace('\n', '
') - self.plugin_description_textview.tv.display_html( - txt, self.plugin_description_textview) + txt = '' + txt + txt += ' ' + self.plugin_description_textview.tv.display_html(txt, + self.plugin_description_textview, None) self.plugin_description_textview.tv.set_property('sensitive', True) self.uninstall_plugin_button.set_property('sensitive',