PluginInstallerPlugin. Correctly remove 'Available' page

This commit is contained in:
Denis Fomin
2013-04-25 16:31:31 +04:00
parent 931bb4f061
commit 6f15b1b593
2 changed files with 4 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
[info] [info]
name: Plugin Installer name: Plugin Installer
short_name: plugin_installer short_name: plugin_installer
version: 0.11.1 version: 0.11.2
description: Install and upgrade plugins from ftp description: Install and upgrade plugins from ftp
authors: Denis Fomin <fominde@gmail.com> authors: Denis Fomin <fominde@gmail.com>
Yann Leboulanger <asterix@lagaule.org> Yann Leboulanger <asterix@lagaule.org>

View File

@@ -152,7 +152,7 @@ class PluginInstaller(GajimPlugin):
def deactivate(self): def deactivate(self):
self.pl_menuitem.disconnect(self.id_) self.pl_menuitem.disconnect(self.id_)
if hasattr(self, 'page_num'): if hasattr(self, 'page_num'):
self.notebook.remove_page(self.page_num) self.notebook.remove_page(self.notebook.page_num(self.hpaned))
self.notebook.set_current_page(0) self.notebook.set_current_page(0)
for id_, widget in list(self.connected_ids.items()): for id_, widget in list(self.connected_ids.items()):
widget.disconnect(id_) widget.disconnect(id_)
@@ -181,8 +181,8 @@ class PluginInstaller(GajimPlugin):
self.xml = Gtk.Builder() self.xml = Gtk.Builder()
self.xml.set_translation_domain('gajim_plugins') self.xml.set_translation_domain('gajim_plugins')
self.xml.add_objects_from_file(self.Gtk_BUILDER_FILE_PATH, ['hpaned2']) self.xml.add_objects_from_file(self.Gtk_BUILDER_FILE_PATH, ['hpaned2'])
hpaned = self.xml.get_object('hpaned2') self.hpaned = self.xml.get_object('hpaned2')
self.page_num = self.notebook.append_page(hpaned, self.page_num = self.notebook.append_page(self.hpaned,
Gtk.Label(_('Available'))) Gtk.Label(_('Available')))
widgets_to_extract = ('plugin_name_label1', widgets_to_extract = ('plugin_name_label1',