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:
4
mpris2_support/CHANGELOG
Normal file
4
mpris2_support/CHANGELOG
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
0.3.3 - 26-12-2016
|
||||||
|
|
||||||
|
- Dont activate Plugin on missing dependencys
|
||||||
|
- Remove unused imports
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
[info]
|
[info]
|
||||||
name: MPRIS2 support
|
name: MPRIS2 support
|
||||||
short_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.
|
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 = https://dev.gajim.org/gajim/gajim-plugins/wikis/mprissupportplugin
|
||||||
min_gajim_version: 0.16.10
|
min_gajim_version: 0.16.10
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from common import gajim
|
|
||||||
from plugins import GajimPlugin
|
from plugins import GajimPlugin
|
||||||
from plugins.helpers import log_calls
|
from plugins.helpers import log_calls
|
||||||
from plugins.plugin import GajimPluginException
|
|
||||||
from common import dbus_support
|
from common import dbus_support
|
||||||
|
|
||||||
|
ERR_MSG = ''
|
||||||
|
|
||||||
if dbus_support.supported:
|
if dbus_support.supported:
|
||||||
from music_track_listener import MusicTrackListener
|
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):
|
class MusicTrackInfo(object):
|
||||||
@@ -24,11 +28,12 @@ class Mpris2Plugin(GajimPlugin):
|
|||||||
self.description = _('MPRIS2 support. Allows to update status message '
|
self.description = _('MPRIS2 support. Allows to update status message '
|
||||||
'according to the music you\'re listening via the MPRIS2 D-Bus API.')
|
'according to the music you\'re listening via the MPRIS2 D-Bus API.')
|
||||||
self.config_dialog = None
|
self.config_dialog = None
|
||||||
|
if ERR_MSG:
|
||||||
|
self.available_text = ERR_MSG
|
||||||
|
self.activatable = False
|
||||||
|
return
|
||||||
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):
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
[info]
|
[info]
|
||||||
name: Now Listen
|
name: Now Listen
|
||||||
short_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
|
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 = https://dev.gajim.org/gajim/gajim-plugins/wikis/NowListenPlugin
|
||||||
min_gajim_version: 0.16.10
|
min_gajim_version: 0.16.10
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ from gi.repository import Gtk
|
|||||||
from gi.repository import Gdk
|
from gi.repository import Gdk
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from common import gajim
|
|
||||||
from plugins import GajimPlugin
|
from plugins import GajimPlugin
|
||||||
from plugins.helpers import log_calls
|
from plugins.helpers import log_calls
|
||||||
from plugins.gui import GajimPluginConfigDialog
|
from plugins.gui import GajimPluginConfigDialog
|
||||||
from plugins.plugin import GajimPluginException
|
from plugins.gajimplugin import GajimPluginException
|
||||||
from common import dbus_support
|
from common import dbus_support
|
||||||
|
|
||||||
if dbus_support.supported:
|
if dbus_support.supported:
|
||||||
|
|||||||
Reference in New Issue
Block a user