Skip to content

Commit

Permalink
pipe_manager_box: ignore the default device dropdown selected-item si…
Browse files Browse the repository at this point in the history
…gnal when the defaul device is supposed to be used.
  • Loading branch information
wwmm committed Feb 20, 2024
1 parent a6cb1df commit 23ee389
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pipe_manager_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ void setup(PipeManagerBox* self, app::Application* application) {

g_signal_connect(self->dropdown_input_devices, "notify::selected-item",
G_CALLBACK(+[](GtkDropDown* dropdown, GParamSpec* pspec, PipeManagerBox* self) {
if (gtk_switch_get_state(self->use_default_input) != 0) {
return;
}

if (auto selected_item = gtk_drop_down_get_selected_item(dropdown); selected_item != nullptr) {
auto* holder = static_cast<ui::holders::NodeInfoHolder*>(selected_item);

Expand All @@ -472,6 +476,10 @@ void setup(PipeManagerBox* self, app::Application* application) {

g_signal_connect(self->dropdown_output_devices, "notify::selected-item",
G_CALLBACK(+[](GtkDropDown* dropdown, GParamSpec* pspec, PipeManagerBox* self) {
if (gtk_switch_get_state(self->use_default_output) != 0) {
return;
}

if (auto selected_item = gtk_drop_down_get_selected_item(dropdown); selected_item != nullptr) {
auto* holder = static_cast<ui::holders::NodeInfoHolder*>(selected_item);

Expand Down

0 comments on commit 23ee389

Please sign in to comment.