Skip to content

Commit

Permalink
Fix removing devices
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Feb 13, 2024
1 parent 6d8a2c9 commit 871c445
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/DeviceRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public class Sound.DeviceRow : Gtk.ListBoxRow {
device.bind_property ("display-name", name_label, "label");
device.bind_property ("description", description_label, "label");

device.removed.connect (() => destroy ());
device.notify["is-default"].connect (() => {
ignore_default = true;
activate_radio.active = device.is_default;
Expand Down
2 changes: 2 additions & 0 deletions src/OutputPanel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ public class Sound.OutputPanel : Gtk.Box {
device_row.set_as_default.connect (() => {
pam.set_default_device.begin (device);
});

device.removed.connect (() => devices_listbox.remove (device_row));
}

private void notify_change () {
Expand Down

0 comments on commit 871c445

Please sign in to comment.