diff options
author | Marvin W <git@larma.de> | 2022-02-12 14:35:44 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2022-02-12 14:36:26 +0100 |
commit | 369d0c79d7272b4059c39ecedb10a62121bfbe56 (patch) | |
tree | 6ae87a1fd71b68dd8eff163c2b01dc5903f58ee0 /main/src/ui/call_window/audio_settings_popover.vala | |
parent | 0f5f57888e2e237549b1bc7002770ec102ff0e6b (diff) | |
download | dino-369d0c79d7272b4059c39ecedb10a62121bfbe56.tar.gz dino-369d0c79d7272b4059c39ecedb10a62121bfbe56.zip |
Calls: Fix device selector for multi-party calls, allow picking device before call started
Diffstat (limited to 'main/src/ui/call_window/audio_settings_popover.vala')
-rw-r--r-- | main/src/ui/call_window/audio_settings_popover.vala | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/main/src/ui/call_window/audio_settings_popover.vala b/main/src/ui/call_window/audio_settings_popover.vala index 3b5dff3f..f7e490cd 100644 --- a/main/src/ui/call_window/audio_settings_popover.vala +++ b/main/src/ui/call_window/audio_settings_popover.vala @@ -37,10 +37,6 @@ public class Dino.Ui.AudioSettingsPopover : Gtk.Popover { micro_frame.add(micro_list_box); foreach (Plugins.MediaDevice device in devices) { Label display_name_label = new Label(device.display_name) { xalign=0, visible=true }; - Label detail_name_label = new Label(device.detail_name) { xalign=0, visible=true }; - detail_name_label.get_style_context().add_class("dim-label"); - detail_name_label.attributes = new Pango.AttrList(); - detail_name_label.attributes.insert(Pango.attr_scale_new(0.8)); Image image = new Image.from_icon_name("object-select-symbolic", IconSize.BUTTON) { visible=true }; if (current_microphone_device == null || current_microphone_device.id != device.id) { image.opacity = 0; @@ -56,7 +52,13 @@ public class Dino.Ui.AudioSettingsPopover : Gtk.Popover { device_box.add(image); Box label_box = new Box(Orientation.VERTICAL, 0) { visible = true }; label_box.add(display_name_label); - label_box.add(detail_name_label); + if (device.detail_name != null) { + Label detail_name_label = new Label(device.detail_name) { xalign=0, visible=true }; + detail_name_label.get_style_context().add_class("dim-label"); + detail_name_label.attributes = new Pango.AttrList(); + detail_name_label.attributes.insert(Pango.attr_scale_new(0.8)); + label_box.add(detail_name_label); + } device_box.add(label_box); ListBoxRow list_box_row = new ListBoxRow() { visible=true }; list_box_row.add(device_box); @@ -94,10 +96,6 @@ public class Dino.Ui.AudioSettingsPopover : Gtk.Popover { speaker_frame.add(speaker_list_box); foreach (Plugins.MediaDevice device in devices) { Label display_name_label = new Label(device.display_name) { xalign=0, visible=true }; - Label detail_name_label = new Label(device.detail_name) { xalign=0, visible=true }; - detail_name_label.get_style_context().add_class("dim-label"); - detail_name_label.attributes = new Pango.AttrList(); - detail_name_label.attributes.insert(Pango.attr_scale_new(0.8)); Image image = new Image.from_icon_name("object-select-symbolic", IconSize.BUTTON) { visible=true }; if (current_speaker_device == null || current_speaker_device.id != device.id) { image.opacity = 0; @@ -113,7 +111,13 @@ public class Dino.Ui.AudioSettingsPopover : Gtk.Popover { device_box.add(image); Box label_box = new Box(Orientation.VERTICAL, 0) { visible = true }; label_box.add(display_name_label); - label_box.add(detail_name_label); + if (device.detail_name != null) { + Label detail_name_label = new Label(device.detail_name) { xalign=0, visible=true }; + detail_name_label.get_style_context().add_class("dim-label"); + detail_name_label.attributes = new Pango.AttrList(); + detail_name_label.attributes.insert(Pango.attr_scale_new(0.8)); + label_box.add(detail_name_label); + } device_box.add(label_box); ListBoxRow list_box_row = new ListBoxRow() { visible=true }; list_box_row.add(device_box); |