From 0d6817be4fb795ca63728dedadb681fa0c5952fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Mon, 19 Jun 2023 10:09:10 -0700 Subject: [PATCH] OutputPanel: set volume scale sensitive based on device --- src/OutputPanel.vala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OutputPanel.vala b/src/OutputPanel.vala index 12ed171c..17880f46 100644 --- a/src/OutputPanel.vala +++ b/src/OutputPanel.vala @@ -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); @@ -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);