diff options
-rw-r--r-- | panels/sound/gvc-mixer-dialog.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/panels/sound/gvc-mixer-dialog.c b/panels/sound/gvc-mixer-dialog.c index 84c7e00be..56d083215 100644 --- a/panels/sound/gvc-mixer-dialog.c +++ b/panels/sound/gvc-mixer-dialog.c @@ -232,6 +232,7 @@ update_output_settings (GvcMixerDialog *dialog) GvcMixerStream *stream; const GvcChannelMap *map; const GList *ports; + GtkAdjustment *adj; g_debug ("Updating output settings"); if (dialog->priv->output_balance_bar != NULL) { @@ -266,6 +267,12 @@ update_output_settings (GvcMixerDialog *dialog) gvc_channel_bar_set_is_amplified (GVC_CHANNEL_BAR (dialog->priv->output_bar), gvc_mixer_stream_get_can_decibel (stream)); + /* Update the adjustment in case the previous bar wasn't decibel + * capable, and we clipped it */ + adj = GTK_ADJUSTMENT (gvc_channel_bar_get_adjustment (GVC_CHANNEL_BAR (dialog->priv->output_bar))); + gtk_adjustment_set_value (adj, + gvc_mixer_stream_get_volume (stream)); + map = gvc_mixer_stream_get_channel_map (stream); if (map == NULL) { g_warning ("Default sink stream has no channel map"); @@ -586,8 +593,9 @@ stop_monitor_stream_for_source (GvcMixerDialog *dialog) static void update_input_settings (GvcMixerDialog *dialog) { - const GList *ports; + const GList *ports; GvcMixerStream *stream; + GtkAdjustment *adj; g_debug ("Updating input settings"); @@ -610,6 +618,12 @@ update_input_settings (GvcMixerDialog *dialog) gvc_channel_bar_set_is_amplified (GVC_CHANNEL_BAR (dialog->priv->input_bar), gvc_mixer_stream_get_can_decibel (stream)); + /* Update the adjustment in case the previous bar wasn't decibel + * capable, and we clipped it */ + adj = GTK_ADJUSTMENT (gvc_channel_bar_get_adjustment (GVC_CHANNEL_BAR (dialog->priv->input_bar))); + gtk_adjustment_set_value (adj, + gvc_mixer_stream_get_volume (stream)); + ports = gvc_mixer_stream_get_ports (stream); if (ports != NULL) { const GvcMixerStreamPort *port; |