diff --git a/plugin_installer/config_dialog.ui b/plugin_installer/config_dialog.ui index 1ee652a..49a30ab 100644 --- a/plugin_installer/config_dialog.ui +++ b/plugin_installer/config_dialog.ui @@ -1,9 +1,6 @@ - - Plug-in decription should be displayed here. This text will be erased during PluginsWindow initialization. - False @@ -30,9 +27,7 @@ True 1 - - none - + @@ -46,9 +41,6 @@ False - 6 - 6 - True end @@ -74,12 +66,9 @@ True False 0 - empty + <empty> True end - - - False @@ -210,14 +199,13 @@ - + True True - 6 - word - 6 - 6 - 1 + in + + + True @@ -309,7 +297,7 @@ True - False + True @@ -366,7 +354,7 @@ False False False - 0 + 0.5 True @@ -385,7 +373,7 @@ False False False - 0 + 0.5 True diff --git a/plugin_installer/manifest.ini b/plugin_installer/manifest.ini index ca2f97d..4842a28 100644 --- a/plugin_installer/manifest.ini +++ b/plugin_installer/manifest.ini @@ -1,7 +1,7 @@ [info] name: Plugin Installer short_name: plugin_installer -version: 0.11.2 +version: 0.11.3 description: Install and upgrade plugins from ftp authors: Denis Fomin Yann Leboulanger diff --git a/plugin_installer/plugin_installer.py b/plugin_installer/plugin_installer.py index ec993da..c6be6b5 100644 --- a/plugin_installer/plugin_installer.py +++ b/plugin_installer/plugin_installer.py @@ -35,6 +35,7 @@ import zipfile from common import gajim from plugins import GajimPlugin from plugins.helpers import log_calls, log +from conversation_textview import ConversationTextview from dialogs import WarningDialog, HigDialog, YesNoDialog from plugins.gui import GajimPluginConfigDialog @@ -188,7 +189,7 @@ class PluginInstaller(GajimPlugin): widgets_to_extract = ('plugin_name_label1', 'available_treeview', 'progressbar', 'inslall_upgrade_button', 'plugin_authors_label1', 'plugin_authors_label1', - 'plugin_homepage_linkbutton1', 'plugin_description_textview1') + 'plugin_homepage_linkbutton1') for widget_name in widgets_to_extract: setattr(self, widget_name, self.xml.get_object(widget_name)) @@ -247,6 +248,11 @@ class PluginInstaller(GajimPlugin): selection.set_mode(Gtk.SelectionMode.SINGLE) self._clear_available_plugin_info() + + self.plugin_description_textview = ConversationTextview(None) + sw = self.xml.get_object('scrolledwindow1') + sw.add(self.plugin_description_textview.tv) + self.xml.connect_signals(self) self.window.show_all() @@ -349,6 +355,11 @@ class PluginInstaller(GajimPlugin): def available_plugins_treeview_selection_changed(self, treeview_selection): model, iter = treeview_selection.get_selected() + self.xml.get_object('scrolledwindow1').get_children()[0].destroy() + self.plugin_description_textview = ConversationTextview(None) + sw = self.xml.get_object('scrolledwindow1') + sw.add(self.plugin_description_textview.tv) + 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)) @@ -359,9 +370,13 @@ class PluginInstaller(GajimPlugin): label = self.plugin_homepage_linkbutton1.get_children()[0] label.set_ellipsize(Pango.EllipsizeMode.END) self.plugin_homepage_linkbutton1.set_property('sensitive', True) - desc_textbuffer = self.plugin_description_textview1.get_buffer() - desc_textbuffer.set_text(_(model.get_value(iter, C_DESCRIPTION))) - self.plugin_description_textview1.set_property('sensitive', True) + desc = _(model.get_value(iter, C_DESCRIPTION)) + if not desc.startswith('' + \ + desc + ' ' + self.plugin_description_textview.tv.display_html( + desc, self.plugin_description_textview) + self.plugin_description_textview.tv.set_property('sensitive', True) else: self._clear_available_plugin_info() @@ -372,10 +387,6 @@ class PluginInstaller(GajimPlugin): self.plugin_homepage_linkbutton1.set_label('') self.plugin_homepage_linkbutton1.set_property('sensitive', False) - desc_textbuffer = self.plugin_description_textview1.get_buffer() - desc_textbuffer.set_text('') - self.plugin_description_textview1.set_property('sensitive', False) - def scan_dir_for_plugin(self, path): plugins_found = [] conf = configparser.ConfigParser()