Skip to content
Snippets Groups Projects
Commit 671ca27f authored by Dicson's avatar Dicson
Browse files

plugin_installer and ubuntu_integration. compatible with 0.15 and trunk

parent e0a84d89
No related branches found
No related tags found
No related merge requests found
[info]
name: Plugin Installer
short_name: plugin_installer
version: 0.9.1
version: 0.9.2
description: Install and upgrade plugins from ftp
authors: Denis Fomin <fominde@gmail.com>
Yann Leboulanger <asterix@lagaule.org>
......
......@@ -285,8 +285,13 @@ class PluginInstaller(GajimPlugin):
if is_active and plugin.name != self.name:
gobject.idle_add(gajim.plugin_manager.activate_plugin, plugin)
if plugin.name != 'Plugin Installer':
self.installed_plugins_model.append([plugin, plugin.name,
is_active, plugin.activatable])
version = gajim.version.split('-')[0]
if version == '0.15':
self.installed_plugins_model.append([plugin, plugin.name,
is_active])
else:
self.installed_plugins_model.append([plugin, plugin.name,
is_active, plugin.activatable])
dialog = HigDialog(None, gtk.MESSAGE_INFO, gtk.BUTTONS_OK,
'', _('All selected plugins downloaded'))
dialog.set_modal(False)
......
[info]
name: Ubuntu Ayatana Integration
short_name: ubuntu_integration
version: 0.1.1
version: 0.1.2
description: This plugin integrates Gajim with the Ubuntu Messaging Menu.
You must have python-indicate and python-xdg (and Gajim obviously) installed to enable this plugin.
......
......@@ -25,12 +25,6 @@ from plugins.plugin import GajimPluginException
from plugins.helpers import log_calls
from common import gajim
import gtkgui_helpers
# 3rd party
try:
__import__('indicate')
HAS_INDICATE = True
except ImportError:
HAS_INDICATE = False
class UbuntuIntegrationPlugin(GajimPlugin):
......@@ -50,6 +44,22 @@ class UbuntuIntegrationPlugin(GajimPlugin):
'Many thanks to the guys from gajim@conference.gajim.org for '
'answering my questions :)')
self.config_dialog = None
self.test_activatable()
def test_activatable(self):
self.available_text = ''
try:
from xdg.BaseDirectory import load_data_paths
except ImportError:
self.activatable = False
self.available_text += _('python-xdg is missing! '
'Install python-xdg.\n')
try:
import indicate
except ImportError:
self.activatable = False
self.available_text += _('python-indicate is missing! '
'Install python-indicate.')
@log_calls("UbuntuIntegrationPlugin")
def activate(self):
......@@ -59,13 +69,9 @@ class UbuntuIntegrationPlugin(GajimPlugin):
# {(account, jid): (indicator, [event, ...]), ...}
self.events = {}
try:
from xdg.BaseDirectory import load_data_paths
except ImportError:
raise GajimPluginException("python-xdg is missing!")
if not HAS_INDICATE:
raise GajimPluginException("python-indicate is missing!")
version = gajim.version.split('-')[0]
if version == '0.15' and self.available_text:
raise GajimPluginException(self.available_text)
self.server = indicate.indicate_server_ref_default()
self.server.set_type("message.im")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment