[gnome-control-center/gnome-3-28] In some cases the input volume bar will not be disabled when there is no any input source, so this c



commit fa2b055c8d0fdbf1ecb71d65ffebdf8fb0d2f2c6
Author: hugh chao (hugh712) <hugh chao canonical com>
Date:   Fri Nov 29 13:09:21 2019 +0800

    In some cases the input volume bar will not be disabled when there is no
    any input source, so this commit is a fix to handle this.
    
    https://gitlab.gnome.org/GNOME/gnome-control-center/issues/324

 panels/sound/gvc-mixer-dialog.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/panels/sound/gvc-mixer-dialog.c b/panels/sound/gvc-mixer-dialog.c
index 009151841..6eace4b6b 100644
--- a/panels/sound/gvc-mixer-dialog.c
+++ b/panels/sound/gvc-mixer-dialog.c
@@ -1287,6 +1287,9 @@ on_control_input_removed (GvcMixerControl *control,
         if (found) {
                 gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
         }
+
+        if (gtk_tree_model_iter_n_children (model, NULL) == 0)
+                gtk_widget_set_sensitive (dialog->input_bar, FALSE);
 }
 
 static void


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