From 6f15b1b5934360822cde3bba9f966c542dce4681 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Thu, 25 Apr 2013 16:31:31 +0400 Subject: [PATCH] PluginInstallerPlugin. Correctly remove 'Available' page --- plugin_installer/manifest.ini | 2 +- plugin_installer/plugin_installer.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin_installer/manifest.ini b/plugin_installer/manifest.ini index ca22255..ca2f97d 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.1 +version: 0.11.2 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 e6c7ece..33119ac 100644 --- a/plugin_installer/plugin_installer.py +++ b/plugin_installer/plugin_installer.py @@ -152,7 +152,7 @@ class PluginInstaller(GajimPlugin): def deactivate(self): self.pl_menuitem.disconnect(self.id_) 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) for id_, widget in list(self.connected_ids.items()): widget.disconnect(id_) @@ -181,8 +181,8 @@ class PluginInstaller(GajimPlugin): self.xml = Gtk.Builder() self.xml.set_translation_domain('gajim_plugins') self.xml.add_objects_from_file(self.Gtk_BUILDER_FILE_PATH, ['hpaned2']) - hpaned = self.xml.get_object('hpaned2') - self.page_num = self.notebook.append_page(hpaned, + self.hpaned = self.xml.get_object('hpaned2') + self.page_num = self.notebook.append_page(self.hpaned, Gtk.Label(_('Available'))) widgets_to_extract = ('plugin_name_label1',