diff options
author | Michal Ratajsky <[email protected]> | 2014-07-03 19:06:24 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2014-10-09 16:51:28 +0200 |
commit | 8481ebdc843ec212e59f98c8ff5f718485f864c0 (patch) | |
tree | b583d25bde99c960956886a837f7434392480d7b /plugins/media-keys/msd-media-keys-plugin.c | |
parent | 163f01a8b527c1ed801f68681fc7d82a54d42b1c (diff) | |
download | mate-settings-daemon-8481ebdc843ec212e59f98c8ff5f718485f864c0.tar.bz2 mate-settings-daemon-8481ebdc843ec212e59f98c8ff5f718485f864c0.tar.xz |
Remove GStreamer parts and use libmatemixer
Diffstat (limited to 'plugins/media-keys/msd-media-keys-plugin.c')
-rw-r--r-- | plugins/media-keys/msd-media-keys-plugin.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/plugins/media-keys/msd-media-keys-plugin.c b/plugins/media-keys/msd-media-keys-plugin.c index 93a805f..0b40418 100644 --- a/plugins/media-keys/msd-media-keys-plugin.c +++ b/plugins/media-keys/msd-media-keys-plugin.c @@ -20,8 +20,13 @@ #include "config.h" +#include <glib.h> #include <glib/gi18n-lib.h> -#include <gmodule.h> +#include <glib-object.h> + +#ifdef HAVE_LIBMATEMIXER +#include <libmatemixer/matemixer.h> +#endif #include "mate-settings-plugin.h" #include "msd-media-keys-plugin.h" @@ -70,11 +75,13 @@ static void impl_activate (MateSettingsPlugin *plugin) { gboolean res; - GError *error; + GError *error = NULL; g_debug ("Activating media_keys plugin"); - error = NULL; +#ifdef HAVE_LIBMATEMIXER + mate_mixer_init (); +#endif res = msd_media_keys_manager_start (MSD_MEDIA_KEYS_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start media_keys manager: %s", error->message); @@ -87,12 +94,16 @@ impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating media_keys plugin"); msd_media_keys_manager_stop (MSD_MEDIA_KEYS_PLUGIN (plugin)->priv->manager); + +#ifdef HAVE_LIBMATEMIXER + mate_mixer_deinit (); +#endif } static void msd_media_keys_plugin_class_init (MsdMediaKeysPluginClass *klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); object_class->finalize = msd_media_keys_plugin_finalize; @@ -107,4 +118,3 @@ static void msd_media_keys_plugin_class_finalize (MsdMediaKeysPluginClass *klass) { } - |