[gnome-settings-daemon] media-keys: React to stream-removed signal from GvcMixerControl
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] media-keys: React to stream-removed signal from GvcMixerControl
- Date: Tue, 19 Apr 2011 14:01:38 +0000 (UTC)
commit 04695616256ff1be917e6abeabe6f870ab2b8b3c
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Tue Apr 19 16:01:34 2011 +0200
media-keys: React to stream-removed signal from GvcMixerControl
plugins/media-keys/gsd-media-keys-manager.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 8fe0387..6f1b180 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -740,6 +740,19 @@ on_control_default_sink_changed (GvcMixerControl *control,
update_default_sink (manager);
}
+static void
+on_control_stream_removed (GvcMixerControl *control,
+ guint id,
+ GsdMediaKeysManager *manager)
+{
+ if (manager->priv->stream != NULL) {
+ if (gvc_mixer_stream_get_id (manager->priv->stream) == id) {
+ g_object_unref (manager->priv->stream);
+ manager->priv->stream = NULL;
+ }
+ }
+}
+
#endif /* HAVE_PULSE */
static void
@@ -1430,6 +1443,10 @@ gsd_media_keys_manager_start (GsdMediaKeysManager *manager,
"default-sink-changed",
G_CALLBACK (on_control_default_sink_changed),
manager);
+ g_signal_connect (manager->priv->volume,
+ "stream-removed",
+ G_CALLBACK (on_control_stream_removed),
+ manager);
gvc_mixer_control_open (manager->priv->volume);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]