easy way to clear plugin_description_textview

This commit is contained in:
Denis Fomin 2013-08-19 11:28:50 +04:00
parent 40c9dab636
commit 2278433f97
1 changed files with 3 additions and 7 deletions

View File

@ -39,6 +39,7 @@ from common import gajim
from plugins.helpers import log_calls, log from plugins.helpers import log_calls, log
from conversation_textview import ConversationTextview from conversation_textview import ConversationTextview
from plugins.helpers import GajimPluginActivateException from plugins.helpers import GajimPluginActivateException
from plugins.plugins_i18n import _
from common.exceptions import PluginsystemError from common.exceptions import PluginsystemError
( (
@ -139,7 +140,6 @@ class PluginsWindow(object):
self._clear_installed_plugin_info() self._clear_installed_plugin_info()
def _display_installed_plugin_info(self, plugin): def _display_installed_plugin_info(self, plugin):
from plugins.plugins_i18n import _
self.plugin_name_label.set_text(plugin.name) self.plugin_name_label.set_text(plugin.name)
self.plugin_version_label.set_text(plugin.version) self.plugin_version_label.set_text(plugin.version)
self.plugin_authors_label.set_text(plugin.authors) self.plugin_authors_label.set_text(plugin.authors)
@ -149,12 +149,8 @@ class PluginsWindow(object):
label.set_ellipsize(Pango.EllipsizeMode.END) label.set_ellipsize(Pango.EllipsizeMode.END)
self.plugin_homepage_linkbutton.set_property('sensitive', True) self.plugin_homepage_linkbutton.set_property('sensitive', True)
sw = self.xml.get_object('scrolledwindow2') desc_textbuffer = self.plugin_description_textview.get_buffer()
old_tv = sw.get_children()[0] desc_textbuffer.set_text('')
old_tv.destroy()
self.plugin_description_textview = HtmlTextView()
sw.add(self.plugin_description_textview)
sw.show_all()
txt = plugin.description txt = plugin.description
txt.replace('</body>', '') txt.replace('</body>', '')
if plugin.available_text: if plugin.available_text: