From 2278433f970daab9c9d4ee9d2dd3c040cd254e1b Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Mon, 19 Aug 2013 11:28:50 +0400 Subject: [PATCH] easy way to clear plugin_description_textview --- src/plugins/gui.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/plugins/gui.py b/src/plugins/gui.py index 802aff618..cbd31dbbc 100644 --- a/src/plugins/gui.py +++ b/src/plugins/gui.py @@ -39,6 +39,7 @@ from common import gajim from plugins.helpers import log_calls, log from conversation_textview import ConversationTextview from plugins.helpers import GajimPluginActivateException +from plugins.plugins_i18n import _ from common.exceptions import PluginsystemError ( @@ -139,7 +140,6 @@ class PluginsWindow(object): self._clear_installed_plugin_info() def _display_installed_plugin_info(self, plugin): - from plugins.plugins_i18n import _ self.plugin_name_label.set_text(plugin.name) self.plugin_version_label.set_text(plugin.version) self.plugin_authors_label.set_text(plugin.authors) @@ -149,12 +149,8 @@ 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() + desc_textbuffer = self.plugin_description_textview.get_buffer() + desc_textbuffer.set_text('') txt = plugin.description txt.replace('', '') if plugin.available_text: