From 40ccc47b59505070f14e75ed727ff7dc0a9b2997 Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Feb 25 2018 01:23:22 +0000 Subject: Fix for gnomeshortcuts plugin for GNOME 3.26. Listen on org.gnome.SettingsDaemon.MediaKeys. --- diff --git a/audacious-plugins-3.8.2-enable-gnomeshortcuts.patch b/audacious-plugins-3.8.2-enable-gnomeshortcuts.patch deleted file mode 100644 index 2715bfd..0000000 --- a/audacious-plugins-3.8.2-enable-gnomeshortcuts.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -Nur audacious-plugins-3.8.2-orig/src/gnomeshortcuts/gnomeshortcuts.cc audacious-plugins-3.8.2/src/gnomeshortcuts/gnomeshortcuts.cc ---- audacious-plugins-3.8.2-orig/src/gnomeshortcuts/gnomeshortcuts.cc 2017-01-20 18:03:32.000000000 +0100 -+++ audacious-plugins-3.8.2/src/gnomeshortcuts/gnomeshortcuts.cc 2017-05-13 20:24:27.342147415 +0200 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - - #include -@@ -40,7 +41,7 @@ - about - }; - -- constexpr GNOMEShortcuts () : GeneralPlugin (info, false) {} -+ constexpr GNOMEShortcuts () : GeneralPlugin (info, true) {} - - bool init (); - void cleanup (); -@@ -227,6 +228,7 @@ - { - DBusGConnection *bus; - GError *error = nullptr; -+ DBusError derror; - dbus_g_thread_init(); - - bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error); -@@ -235,6 +237,15 @@ - g_error_free (error); - return false; - } else { -+ dbus_error_init(&derror); -+ if ( !dbus_bus_name_has_owner(dbus_g_connection_get_connection(bus), -+ "org.gnome.SettingsDaemon", &derror) ) { -+ if (dbus_error_is_set(&derror)) { -+ g_warning("%s", derror.message); -+ dbus_error_free(&derror); -+ } -+ return false; -+ } - media_player_keys_proxy = dbus_g_proxy_new_for_name (bus, - "org.gnome.SettingsDaemon", - "/org/gnome/SettingsDaemon/MediaKeys", diff --git a/audacious-plugins-3.9-gnomeshortcuts.patch b/audacious-plugins-3.9-gnomeshortcuts.patch new file mode 100644 index 0000000..ab64dba --- /dev/null +++ b/audacious-plugins-3.9-gnomeshortcuts.patch @@ -0,0 +1,47 @@ +diff -Naur audacious-plugins-3.9-orig/src/gnomeshortcuts/gnomeshortcuts.cc audacious-plugins-3.9/src/gnomeshortcuts/gnomeshortcuts.cc +--- audacious-plugins-3.9-orig/src/gnomeshortcuts/gnomeshortcuts.cc 2017-08-20 03:20:10.000000000 +0200 ++++ audacious-plugins-3.9/src/gnomeshortcuts/gnomeshortcuts.cc 2018-02-25 02:16:16.361665572 +0100 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -40,7 +41,7 @@ + about + }; + +- constexpr GNOMEShortcuts () : GeneralPlugin (info, false) {} ++ constexpr GNOMEShortcuts () : GeneralPlugin (info, true) {} + + bool init (); + void cleanup (); +@@ -227,6 +228,7 @@ + { + DBusGConnection *bus; + GError *error = nullptr; ++ DBusError derror; + dbus_g_thread_init(); + + bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error); +@@ -235,8 +237,17 @@ + g_error_free (error); + return false; + } else { ++ dbus_error_init(&derror); ++ if ( !dbus_bus_name_has_owner(dbus_g_connection_get_connection(bus), ++ "org.gnome.SettingsDaemon.MediaKeys", &derror) ) { ++ if (dbus_error_is_set(&derror)) { ++ g_warning("%s", derror.message); ++ dbus_error_free(&derror); ++ } ++ return false; ++ } + media_player_keys_proxy = dbus_g_proxy_new_for_name (bus, +- "org.gnome.SettingsDaemon", ++ "org.gnome.SettingsDaemon.MediaKeys", + "/org/gnome/SettingsDaemon/MediaKeys", + "org.gnome.SettingsDaemon.MediaKeys"); + if (media_player_keys_proxy == nullptr) diff --git a/audacious-plugins.spec b/audacious-plugins.spec index a0bb76e..3e3810c 100644 --- a/audacious-plugins.spec +++ b/audacious-plugins.spec @@ -11,7 +11,7 @@ Name: audacious-plugins Version: 3.9 -Release: 5%{?dist} +Release: 6%{?dist} %if %{with gtk2} %global tar_ver %{version} @@ -38,8 +38,10 @@ Source102: audacious-plugins-jack.metainfo.xml # Fedora customization Patch0: audacious-plugins-3.7-alpha1-xmms-skindir.patch -# Fedora customization (RFE bz #632388) -Patch1: audacious-plugins-3.8.2-enable-gnomeshortcuts.patch +# Fedora customization (RFE bz #632388 / enable them by default) +# avoid autospawning settings daemon +# fix for GNOME 3.26 / listen on org.gnome.SettingsDaemon.MediaKeys +Patch1: audacious-plugins-3.9-gnomeshortcuts.patch # Fedora customization: add default system-wide module_path Patch2: audacious-plugins-3.6-ladspa.patch # post-3.9 unbundling @@ -327,6 +329,10 @@ install -p -m0644 %{SOURCE102} ${RPM_BUILD_ROOT}%{_datadir}/appdata %changelog +* Fri Feb 23 2018 Michael Schwendt - 3.9-6 +- Fix for gnomeshortcuts plugin for GNOME 3.26. + Listen on org.gnome.SettingsDaemon.MediaKeys. + * Wed Feb 07 2018 Fedora Release Engineering - 3.9-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild