Merge branch 'mpris-bugfix' into 'gtk3'

Cherry pick mpris-bugfix branch from master and fix imports in listen now.

See merge request !17
This commit is contained in:
Philipp Hörist
2017-01-30 20:29:31 +01:00
5 changed files with 20 additions and 12 deletions

4
mpris2_support/CHANGELOG Normal file
View File

@@ -0,0 +1,4 @@
0.3.3 - 26-12-2016
- Dont activate Plugin on missing dependencys
- Remove unused imports

View File

@@ -1,8 +1,8 @@
[info]
name: MPRIS2 support
short_name: mpris2_support
version: 0.3.2
version: 0.3.3
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>
homepage = http://trac-plugins.gajim.org/wiki/MprisSupportPlugin
homepage = https://dev.gajim.org/gajim/gajim-plugins/wikis/mprissupportplugin
min_gajim_version: 0.16.10

View File

@@ -1,16 +1,20 @@
# -*- coding: utf-8 -*-
import os
from common import gajim
from plugins import GajimPlugin
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
else:
ERR_MSG = 'D-Bus Python bindings are missing'
if os.name == 'nt':
ERR_MSG = 'Plugin can\'t be run under Windows.'
class MusicTrackInfo(object):
@@ -24,11 +28,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
if ERR_MSG:
self.available_text = ERR_MSG
self.activatable = False
return
self.artist = self.title = self.source = ''
self.listener = MusicTrackListener().get()
if os.name == 'nt':
self.available_text = _('Plugin can\'t be run under Windows.')
self.activatable = False
@log_calls('NowListenPlugin')
def activate(self):

View File

@@ -1,8 +1,8 @@
[info]
name: Now Listen
short_name: now-listen
version: 0.2.2
version: 0.2.3
description: Copy tune info to conversation input box (alt + n) at cursor position
authors = Denis Fomin <fominde@gmail.com>
homepage = http://trac-plugins.gajim.org/wiki/NowListenPlugin
homepage = https://dev.gajim.org/gajim/gajim-plugins/wikis/NowListenPlugin
min_gajim_version: 0.16.10

View File

@@ -4,11 +4,10 @@ from gi.repository import Gtk
from gi.repository import Gdk
import os
from common import gajim
from plugins import GajimPlugin
from plugins.helpers import log_calls
from plugins.gui import GajimPluginConfigDialog
from plugins.plugin import GajimPluginException
from plugins.gajimplugin import GajimPluginException
from common import dbus_support
if dbus_support.supported: