[gnome-media] Fix startup warning when default output is muted



commit a579623ec869906cbf3d25b5de1954c5ba5c6eb0
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jul 17 12:56:43 2009 +0100

    Fix startup warning when default output is muted
    
    We used to get an "Unable to find stream for bar" when the
    default output was muted, as we would set the bar status (muted)
    before setting the stream on it. Make sure the stream is set
    ahead of setting the mute status.

 gnome-volume-control/src/gvc-mixer-dialog.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnome-volume-control/src/gvc-mixer-dialog.c b/gnome-volume-control/src/gvc-mixer-dialog.c
index 909c4ea..6f8d927 100644
--- a/gnome-volume-control/src/gvc-mixer-dialog.c
+++ b/gnome-volume-control/src/gvc-mixer-dialog.c
@@ -686,6 +686,9 @@ bar_set_stream (GvcMixerDialog *dialog,
 
         adj = GTK_ADJUSTMENT (gvc_channel_bar_get_adjustment (GVC_CHANNEL_BAR (bar)));
 
+        g_object_set_data (G_OBJECT (bar), "gvc-mixer-dialog-stream", stream);
+        g_object_set_data (G_OBJECT (adj), "gvc-mixer-dialog-stream", stream);
+
         if (stream != NULL) {
                 is_muted = gvc_mixer_stream_get_is_muted (stream);
                 gvc_channel_bar_set_is_muted (GVC_CHANNEL_BAR (bar), is_muted);
@@ -695,9 +698,6 @@ bar_set_stream (GvcMixerDialog *dialog,
                 gtk_adjustment_set_value (adj,
                                           gvc_mixer_stream_get_volume (stream));
         }
-
-        g_object_set_data (G_OBJECT (bar), "gvc-mixer-dialog-stream", stream);
-        g_object_set_data (G_OBJECT (adj), "gvc-mixer-dialog-stream", stream);
 }
 
 static void



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