1
From c9a6a27aa766b31d9f32d182b1de5886793e906b Mon Sep 17 00:00:00 2001
2
From: Rodrigo Moya <rodrigo@gnome-db.org>
3
Date: Tue, 19 Apr 2011 15:59:35 +0200
4
Subject: [PATCH] media-keys: React to stream-removed signal from GvcMixerControl
7
plugins/media-keys/gsd-media-keys-manager.c | 17 +++++++++++++++++
8
1 files changed, 17 insertions(+), 0 deletions(-)
10
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
11
index b563f73..1f18074 100644
12
--- a/plugins/media-keys/gsd-media-keys-manager.c
13
+++ b/plugins/media-keys/gsd-media-keys-manager.c
14
@@ -794,6 +794,19 @@ on_control_default_sink_changed (GvcMixerControl *control,
15
update_default_sink (manager);
19
+on_control_stream_removed (GvcMixerControl *control,
21
+ GsdMediaKeysManager *manager)
23
+ if (manager->priv->stream != NULL) {
24
+ if (gvc_mixer_stream_get_id (manager->priv->stream) == id) {
25
+ g_object_unref (manager->priv->stream);
26
+ manager->priv->stream = NULL;
31
#endif /* HAVE_PULSE */
34
@@ -1118,6 +1131,10 @@ gsd_media_keys_manager_start (GsdMediaKeysManager *manager,
35
"default-sink-changed",
36
G_CALLBACK (on_control_default_sink_changed),
38
+ g_signal_connect (manager->priv->volume,
40
+ G_CALLBACK (on_control_stream_removed),
43
gvc_mixer_control_open (manager->priv->volume);