plugin_installer and ubuntu_integration. compatible with 0.15 and trunk
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
[info]
|
[info]
|
||||||
name: Plugin Installer
|
name: Plugin Installer
|
||||||
short_name: plugin_installer
|
short_name: plugin_installer
|
||||||
version: 0.9.1
|
version: 0.9.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>
|
||||||
|
|||||||
@@ -285,8 +285,13 @@ class PluginInstaller(GajimPlugin):
|
|||||||
if is_active and plugin.name != self.name:
|
if is_active and plugin.name != self.name:
|
||||||
gobject.idle_add(gajim.plugin_manager.activate_plugin, plugin)
|
gobject.idle_add(gajim.plugin_manager.activate_plugin, plugin)
|
||||||
if plugin.name != 'Plugin Installer':
|
if plugin.name != 'Plugin Installer':
|
||||||
self.installed_plugins_model.append([plugin, plugin.name,
|
version = gajim.version.split('-')[0]
|
||||||
is_active, plugin.activatable])
|
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,
|
dialog = HigDialog(None, gtk.MESSAGE_INFO, gtk.BUTTONS_OK,
|
||||||
'', _('All selected plugins downloaded'))
|
'', _('All selected plugins downloaded'))
|
||||||
dialog.set_modal(False)
|
dialog.set_modal(False)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[info]
|
[info]
|
||||||
name: Ubuntu Ayatana Integration
|
name: Ubuntu Ayatana Integration
|
||||||
short_name: ubuntu_integration
|
short_name: ubuntu_integration
|
||||||
version: 0.1.1
|
version: 0.1.2
|
||||||
description: This plugin integrates Gajim with the Ubuntu Messaging Menu.
|
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.
|
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 plugins.helpers import log_calls
|
||||||
from common import gajim
|
from common import gajim
|
||||||
import gtkgui_helpers
|
import gtkgui_helpers
|
||||||
# 3rd party
|
|
||||||
try:
|
|
||||||
__import__('indicate')
|
|
||||||
HAS_INDICATE = True
|
|
||||||
except ImportError:
|
|
||||||
HAS_INDICATE = False
|
|
||||||
|
|
||||||
|
|
||||||
class UbuntuIntegrationPlugin(GajimPlugin):
|
class UbuntuIntegrationPlugin(GajimPlugin):
|
||||||
@@ -50,6 +44,22 @@ class UbuntuIntegrationPlugin(GajimPlugin):
|
|||||||
'Many thanks to the guys from gajim@conference.gajim.org for '
|
'Many thanks to the guys from gajim@conference.gajim.org for '
|
||||||
'answering my questions :)')
|
'answering my questions :)')
|
||||||
self.config_dialog = None
|
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")
|
@log_calls("UbuntuIntegrationPlugin")
|
||||||
def activate(self):
|
def activate(self):
|
||||||
@@ -59,13 +69,9 @@ class UbuntuIntegrationPlugin(GajimPlugin):
|
|||||||
# {(account, jid): (indicator, [event, ...]), ...}
|
# {(account, jid): (indicator, [event, ...]), ...}
|
||||||
self.events = {}
|
self.events = {}
|
||||||
|
|
||||||
try:
|
version = gajim.version.split('-')[0]
|
||||||
from xdg.BaseDirectory import load_data_paths
|
if version == '0.15' and self.available_text:
|
||||||
except ImportError:
|
raise GajimPluginException(self.available_text)
|
||||||
raise GajimPluginException("python-xdg is missing!")
|
|
||||||
|
|
||||||
if not HAS_INDICATE:
|
|
||||||
raise GajimPluginException("python-indicate is missing!")
|
|
||||||
|
|
||||||
self.server = indicate.indicate_server_ref_default()
|
self.server = indicate.indicate_server_ref_default()
|
||||||
self.server.set_type("message.im")
|
self.server.set_type("message.im")
|
||||||
|
|||||||
Reference in New Issue
Block a user