Skip to content

Commit

Permalink
OutputPanel: set volume scale sensitive based on device
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Jun 19, 2023
1 parent 6e2bda9 commit 0d6817b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/OutputPanel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ public class Sound.OutputPanel : Gtk.Box {
pam.new_device.connect (add_device);
pam.notify["default-output"].connect (default_changed);

volume_switch.bind_property ("active", volume_scale, "sensitive", BindingFlags.DEFAULT);
volume_switch.bind_property ("active", balance_scale, "sensitive", BindingFlags.DEFAULT);

var sound_settings = new Settings ("org.gnome.desktop.sound");
sound_settings.bind ("event-sounds", audio_alert_check, "active", GLib.SettingsBindFlags.DEFAULT);

Expand Down Expand Up @@ -237,6 +234,9 @@ public class Sound.OutputPanel : Gtk.Box {
if (volume_switch.active == default_device.is_muted) {
volume_switch.activate ();
}

balance_scale.sensitive = !default_device.is_muted;
volume_scale.sensitive = !default_device.is_muted;
break;
case "volume":
volume_scale.set_value (default_device.volume);
Expand Down

0 comments on commit 0d6817b

Please sign in to comment.