[gnome-control-center/gnome-42] display: Fix primary monitor selection issue with AdwComboRow
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-42] display: Fix primary monitor selection issue with AdwComboRow
- Date: Mon, 12 Sep 2022 12:15:35 +0000 (UTC)
commit 8052e1bc89927164a3f604e1f695b0750048462b
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Aug 23 17:31:31 2022 +0200
display: Fix primary monitor selection issue with AdwComboRow
We were connecting to the selected-index property when AdwComboRow
actually has a selected-item property. This is the same as
issue #2025
Fixes #2028
panels/display/cc-display-panel.c | 4 ++--
panels/display/cc-display-panel.ui | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index 79d51c2c3..08bbd5ed9 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -526,7 +526,7 @@ on_night_light_row_activated_cb (GtkListBoxRow *row,
}
static void
-on_primary_display_selected_index_changed_cb (CcDisplayPanel *panel)
+on_primary_display_selected_item_changed_cb (CcDisplayPanel *panel)
{
gint idx = adw_combo_row_get_selected (panel->primary_display_row);
g_autoptr(CcDisplayMonitor) output = NULL;
@@ -629,7 +629,7 @@ cc_display_panel_class_init (CcDisplayPanelClass *klass)
gtk_widget_class_bind_template_callback (widget_class, on_config_type_toggled_cb);
gtk_widget_class_bind_template_callback (widget_class, on_night_light_list_box_row_activated_cb);
gtk_widget_class_bind_template_callback (widget_class, on_night_light_row_activated_cb);
- gtk_widget_class_bind_template_callback (widget_class, on_primary_display_selected_index_changed_cb);
+ gtk_widget_class_bind_template_callback (widget_class, on_primary_display_selected_item_changed_cb);
gtk_widget_class_bind_template_callback (widget_class, on_screen_changed);
gtk_widget_class_bind_template_callback (widget_class, on_toplevel_escape_pressed_cb);
}
diff --git a/panels/display/cc-display-panel.ui b/panels/display/cc-display-panel.ui
index 437da04d3..846f9a4ee 100644
--- a/panels/display/cc-display-panel.ui
+++ b/panels/display/cc-display-panel.ui
@@ -152,7 +152,7 @@
<object class="AdwComboRow" id="primary_display_row">
<property name="subtitle" translatable="yes">Contains top bar and
Activities</property>
<property name="title" translatable="yes">Primary Display</property>
- <signal name="notify::selected-index"
handler="on_primary_display_selected_index_changed_cb" swapped="yes"/>
+ <signal name="notify::selected-item"
handler="on_primary_display_selected_item_changed_cb" swapped="yes"/>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]