[gnome-control-center/gnome-3-10] sound: Fix output/output bars not following external changes



commit e8ae608cd6367ff7a3e3c42393ae2a3a0363bb0a
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Mar 17 12:15:42 2015 +0100

    sound: Fix output/output bars not following external changes
    
    When looking up a bar for a particular stream, special-case the input
    and output bars/streams, as they will not be added to the "bars"
    hashtable (which is, as per comment, only for applications and the sound
    events bar).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738869

 panels/sound/gvc-mixer-dialog.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/panels/sound/gvc-mixer-dialog.c b/panels/sound/gvc-mixer-dialog.c
index 30749fa..8f0a543 100644
--- a/panels/sound/gvc-mixer-dialog.c
+++ b/panels/sound/gvc-mixer-dialog.c
@@ -690,8 +690,15 @@ lookup_bar_for_stream (GvcMixerDialog *dialog,
         GtkWidget *bar;
 
         bar = g_hash_table_lookup (dialog->priv->bars, GUINT_TO_POINTER (gvc_mixer_stream_get_id (stream)));
+        if (bar)
+                return bar;
 
-        return bar;
+        if (g_object_get_data (G_OBJECT (dialog->priv->output_bar), "gvc-mixer-dialog-stream") == stream)
+                return dialog->priv->output_bar;
+        if (g_object_get_data (G_OBJECT (dialog->priv->input_bar), "gvc-mixer-dialog-stream") == stream)
+                return dialog->priv->input_bar;
+
+        return NULL;
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]