plugin_installer.coding style.
This commit is contained in:
@@ -124,12 +124,16 @@ class PluginInstaller(GajimPlugin):
|
|||||||
if hasattr(self, 'page_num'):
|
if hasattr(self, 'page_num'):
|
||||||
self.notebook.remove_page(self.page_num)
|
self.notebook.remove_page(self.page_num)
|
||||||
self.notebook.set_current_page(0)
|
self.notebook.set_current_page(0)
|
||||||
|
del self.page_num
|
||||||
if hasattr(self, 'ftp'):
|
if hasattr(self, 'ftp'):
|
||||||
del self.ftp
|
del self.ftp
|
||||||
|
|
||||||
def on_activate(self, widget):
|
def on_activate(self, widget):
|
||||||
if 'plugins' not in gajim.interface.instances:
|
if 'plugins' not in gajim.interface.instances:
|
||||||
return
|
return
|
||||||
|
if hasattr(self, 'page_num'):
|
||||||
|
# 'Available' tab exists
|
||||||
|
return
|
||||||
self.installed_plugins_model = gajim.interface.instances[
|
self.installed_plugins_model = gajim.interface.instances[
|
||||||
'plugins'].installed_plugins_model
|
'plugins'].installed_plugins_model
|
||||||
self.notebook = gajim.interface.instances['plugins'].plugins_notebook
|
self.notebook = gajim.interface.instances['plugins'].plugins_notebook
|
||||||
@@ -142,7 +146,6 @@ class PluginInstaller(GajimPlugin):
|
|||||||
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')
|
hpaned = self.xml.get_object('hpaned2')
|
||||||
if not hasattr(self, 'page_num'):
|
|
||||||
self.page_num = self.notebook.append_page(hpaned,
|
self.page_num = self.notebook.append_page(hpaned,
|
||||||
gtk.Label(_('Available')))
|
gtk.Label(_('Available')))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user