Comment 4 for bug 1291862

Revision history for this message
Bin Li (binli) wrote :

This patch fix two issue, it resolve this issue, but I'm an newer for gnome-control-center, so mightbe there are better fix for this issue.
After add the input device, I called 'active_input_update', the input_bar could be adjusted.
The second fix is when we plug out the device, the input_bar is still enabled, we need disable it, but the label on input_bar is still the 'Front Microphone'.

Index: gnome-control-center-3.4.2/panels/sound-nua/gvc-mixer-dialog.c
===================================================================
--- gnome-control-center-3.4.2.orig/panels/sound-nua/gvc-mixer-dialog.c 2014-03-13 16:16:03.291570375 +0800
+++ gnome-control-center-3.4.2/panels/sound-nua/gvc-mixer-dialog.c 2014-03-13 16:35:51.883553147 +0800
@@ -1382,6 +1382,7 @@
                return;
        }
        add_input_ui_entry (dialog, in);
+ active_input_update (dialog, in);
 }

 static void
@@ -1445,6 +1446,7 @@
         found = find_item_by_id (GTK_TREE_MODEL (model), id, ID_COLUMN, &iter);
         if (found) {
                 gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+ gtk_widget_set_sensitive (dialog->priv->input_bar, FALSE);
         }
 }