~kamalmostafa/ubuntu/oneiric/gnome-settings-daemon/bug-827517

« back to all changes in this revision

Viewing changes to debian/patches/17_react_when_streams_removed.patch

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya
  • Date: 2011-07-12 13:04:51 UTC
  • Revision ID: james.westby@ubuntu.com-20110712130451-owt263z06rfnkdgr
Tags: 3.1.3-0ubuntu5
* debian/patches/01_git_shorter_syndaemon_delay.patch:
  - Remove this patch, it fixes the annoyance for some users and breaks it
    for others
* debian/patches/17_react_when_streams_removed.patch:
  - Remove patch not being applied and already upstream
* debian/patches/01_git_a11y_keyboard_cleanup.patch:
  - Do proper cleanup when the plugin is stopped (LP: #804946)
* debian/patches/06_use_application_indicator.patch:
  - Rebased

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
5
 
 
6
 
---
7
 
 plugins/media-keys/gsd-media-keys-manager.c |   17 +++++++++++++++++
8
 
 1 files changed, 17 insertions(+), 0 deletions(-)
9
 
 
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);
16
 
 }
17
 
 
18
 
+static void
19
 
+on_control_stream_removed (GvcMixerControl     *control,
20
 
+                           guint                id,
21
 
+                           GsdMediaKeysManager *manager)
22
 
+{
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;
27
 
+               }
28
 
+        }
29
 
+}
30
 
+
31
 
 #endif /* HAVE_PULSE */
32
 
 
33
 
 static gint
34
 
@@ -1118,6 +1131,10 @@ gsd_media_keys_manager_start (GsdMediaKeysManager *manager,
35
 
                           "default-sink-changed",
36
 
                           G_CALLBACK (on_control_default_sink_changed),
37
 
                           manager);
38
 
+        g_signal_connect (manager->priv->volume,
39
 
+                          "stream-removed",
40
 
+                          G_CALLBACK (on_control_stream_removed),
41
 
+                          manager);
42
 
 
43
 
         gvc_mixer_control_open (manager->priv->volume);
44
 
 
45
 
1.7.2.3
46