Am / On Wed, 14 Nov 2018 13:41:27 +0100 schrieb / wrote Christoph Reiter <[email protected]>:
> On Tue, Nov 13, 2018 at 2:39 PM Klaumi Klingsporn > <[email protected]> wrote: > > Error: g-dbus-error-quark: > > GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: > > Method "GrabMediaPlayerKeys" with signature "su" on > > interface "org.mate.SettingsDaemon.MediaKeys" doesn't > > exist > > Thanks, filed upstream: > https://github.com/quodlibet/quodlibet/issues/3056 Hi Christoph, the bug has been fixed upstream in November with commit 0d8410b (see: https://github.com/lazka/quodlibet/commit/0d8410ba5407434a9fad37781cb0d2d45eef8318). I created a debian patch file out of this commit, built the package with this changes and all workes fine now. I attached the debian patch file. My packages with this patch can be found at: http://apt.klaumikli.de/testing. Would be nice if you could update the official packages too. Thanks! Klaumi ----------- Klaumi Klingsporn mail: [email protected] web: www.klaumikli.de
Description: add upstream commit 0d8410b to fix debian bug #913646 Author: Klaumi Klingsporn <[email protected]> Origin: vendor Last-Update: 2018-12-21 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/quodlibet/mmkeys/gnome.py +++ b/quodlibet/mmkeys/gnome.py @@ -11,8 +11,24 @@ from gi.repository import GLib, Gio +from quodlibet.util import print_exc from ._base import MMKeysBackend, MMKeysAction -from quodlibet.util.environment import dbus_name_owned + + +def dbus_has_interface(dbus_name, dbus_path, dbus_interface): + try: + proxy = Gio.DBusProxy.new_for_bus_sync( + Gio.BusType.SESSION, Gio.DBusProxyFlags.NONE, None, + dbus_name, dbus_path, + "org.freedesktop.DBus.Introspectable", None) + xml = proxy.Introspect() + node = Gio.DBusNodeInfo.new_for_xml(xml) + for iface in node.interfaces: + if iface.name == dbus_interface: + return True + return False + except GLib.Error: + return False class GnomeBackend(MMKeysBackend): @@ -45,7 +61,8 @@ @classmethod def is_active(cls): """If the gsd plugin is active atm""" - return dbus_name_owned(cls.DBUS_NAME) + + return dbus_has_interface(cls.DBUS_NAME, cls.DBUS_PATH, cls.DBUS_IFACE) def cancel(self): if self.__callback: @@ -70,9 +87,8 @@ try: iface.GrabMediaPlayerKeys('(su)', self.__name, self.__grab_time) - except GLib.Error as e: - if 'Error.ServiceUnknown' not in str(e): - raise + except GLib.Error: + print_exc() def __update_interface(self): """If __interface is None, set a proxy interface object and connect @@ -86,7 +102,7 @@ Gio.BusType.SESSION, Gio.DBusProxyFlags.NONE, None, self.DBUS_NAME, self.DBUS_PATH, self.DBUS_IFACE, None) except GLib.Error: - pass + print_exc() else: self.__key_pressed_sig = iface.connect( 'g-signal', self.__on_signal) @@ -152,7 +168,7 @@ try: self.__interface.ReleaseMediaPlayerKeys('(s)', self.__name) except GLib.Error: - pass + print_exc() self.__interface = None

