Commit 5656b787 authored by Philipp Hörist's avatar Philipp Hörist Committed by Tomasz Miąsko

[mpris2] Dont enable Plugin on missing deps

parent 21db440c
......@@ -9,8 +9,15 @@ from plugins.helpers import log_calls
from plugins.plugin import GajimPluginException
from common import dbus_support
ERR_MSG = ''
if dbus_support.supported:
from music_track_listener import MusicTrackListener
ERR_MSG = 'D-Bus Python bindings are missing'
if == 'nt':
ERR_MSG = 'Plugin can\'t be run under Windows.'
class MusicTrackInfo(object):
......@@ -24,11 +31,12 @@ class Mpris2Plugin(GajimPlugin):
self.description = _('MPRIS2 support. Allows to update status message '
'according to the music you\'re listening via the MPRIS2 D-Bus API.')
self.config_dialog = None
self.available_text = ERR_MSG
self.activatable = False
self.artist = self.title = self.source = ''
self.listener = MusicTrackListener().get()
if == 'nt':
self.available_text = _('Plugin can\'t be run under Windows.')
self.activatable = False
def activate(self):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment