Fix widget-combo to check if the alsa elem is writable

This commit is contained in:
Geoffrey D. Bennett
2024-01-03 10:02:20 +10:30
parent 6923a3ddb0
commit bd8f812e01

View File

@@ -20,6 +20,9 @@ static void combo_box_updated(
) {
struct combo *data = private;
int is_writable = alsa_get_elem_writable(elem);
gtk_widget_set_sensitive(data->combo_box, is_writable);
int value = alsa_get_elem_value(elem);
gtk_combo_box_set_active(GTK_COMBO_BOX(data->combo_box), value);
}