Skip to content
Snippets Groups Projects
Commit 573e13c6 authored by Dicson's avatar Dicson
Browse files

Make plugins not activatable under windows(dbus support needed)

parent 69ea341d
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
import dbus import dbus
import datetime as dt import datetime as dt
from gi.repository import GObject from gi.repository import GObject
import os
from common import gajim from common import gajim
from common import ged from common import ged
from common import dbus_support from common import dbus_support
...@@ -29,6 +31,9 @@ class HamsterIntegrationPlugin(GajimPlugin): ...@@ -29,6 +31,9 @@ class HamsterIntegrationPlugin(GajimPlugin):
'and http://projecthamster.wordpress.com/about/') 'and http://projecthamster.wordpress.com/about/')
self.config_dialog = None self.config_dialog = None
self.events_handlers = {} self.events_handlers = {}
if os.name == 'nt':
self.available_text = _('Plugin can\'t be run under Windows.')
self.activatable = False
@log_calls('HamsterIntegrationPlugin') @log_calls('HamsterIntegrationPlugin')
def activate(self): def activate(self):
......
[info] [info]
name: Hamster integration name: Hamster integration
short_name: hamster_integration short_name: hamster_integration
version: 0.1.2 version: 0.1.3
description: Integration with project hamster description: Integration with project hamster
see https://trac.gajim.org/ticket/6993 see https://trac.gajim.org/ticket/6993
and http://projecthamster.wordpress.com/about/ and http://projecthamster.wordpress.com/about/
......
[info] [info]
name: MPRIS2 support name: MPRIS2 support
short_name: mpris2_support short_name: mpris2_support
version: 0.3.1 version: 0.3.2
description: MPRIS2 support. Allows to update status message according to the music you're listening via the MPRIS2 D-Bus API. description: MPRIS2 support. Allows to update status message according to the music you're listening via the MPRIS2 D-Bus API.
authors = Denis Fomin <fominde@gmail.com> authors = Denis Fomin <fominde@gmail.com>
homepage = http://trac-plugins.gajim.org/wiki/MprisSupportPlugin homepage = http://trac-plugins.gajim.org/wiki/MprisSupportPlugin
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os
from common import gajim from common import gajim
from plugins import GajimPlugin from plugins import GajimPlugin
from plugins.helpers import log_calls from plugins.helpers import log_calls
...@@ -24,6 +26,9 @@ class Mpris2Plugin(GajimPlugin): ...@@ -24,6 +26,9 @@ class Mpris2Plugin(GajimPlugin):
self.config_dialog = None self.config_dialog = None
self.artist = self.title = self.source = '' self.artist = self.title = self.source = ''
self.listener = MusicTrackListener().get() self.listener = MusicTrackListener().get()
if os.name == 'nt':
self.available_text = _('Plugin can\'t be run under Windows.')
self.activatable = False
@log_calls('NowListenPlugin') @log_calls('NowListenPlugin')
def activate(self): def activate(self):
......
[info] [info]
name: Now Listen name: Now Listen
short_name: now-listen short_name: now-listen
version: 0.2.1 version: 0.2.2
description: Copy tune info to conversation input box (alt + n) at cursor position description: Copy tune info to conversation input box (alt + n) at cursor position
authors = Denis Fomin <fominde@gmail.com> authors = Denis Fomin <fominde@gmail.com>
homepage = http://trac-plugins.gajim.org/wiki/NowListenPlugin homepage = http://trac-plugins.gajim.org/wiki/NowListenPlugin
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
from gi.repository import Gtk from gi.repository import Gtk
from gi.repository import Gdk from gi.repository import Gdk
import os
from common import gajim from common import gajim
from plugins import GajimPlugin from plugins import GajimPlugin
...@@ -30,6 +31,9 @@ class NowListenPlugin(GajimPlugin): ...@@ -30,6 +31,9 @@ class NowListenPlugin(GajimPlugin):
self.controls = [] self.controls = []
self.first_run = True self.first_run = True
self.music_track_changed_signal = None self.music_track_changed_signal = None
if os.name == 'nt':
self.available_text = _('Plugin can\'t be run under Windows.')
self.activatable = False
@log_calls('NowListenPlugin') @log_calls('NowListenPlugin')
def connect_with_chat_control(self, chat_control): def connect_with_chat_control(self, chat_control):
......
[info] [info]
name: Wicd support name: Wicd support
short_name: wicd_support short_name: wicd_support
version: 0.1.1 version: 0.1.2
description: Support for autodetection of network status for Wicd Network Manager. description: Support for autodetection of network status for Wicd Network Manager.
Requires wicd and python-dbus. Requires wicd and python-dbus.
authors = Denis Fomin <fominde@gmail.com> authors = Denis Fomin <fominde@gmail.com>
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os
from common import gajim from common import gajim
from plugins import GajimPlugin from plugins import GajimPlugin
...@@ -17,6 +18,10 @@ class WicdPlugin(GajimPlugin): ...@@ -17,6 +18,10 @@ class WicdPlugin(GajimPlugin):
def test_activatable(self): def test_activatable(self):
self.available_text = '' self.available_text = ''
if os.name == 'nt':
self.available_text = _('Plugin can\'t be run under Windows.')
self.activatable = False
return
if not dbus_support.supported: if not dbus_support.supported:
self.activatable = False self.activatable = False
self.available_text += _('python-dbus is missing! ' self.available_text += _('python-dbus is missing! '
......
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