From 1704beda95725198cc97db6941c12c9956e489d9 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 30 Aug 2022 12:16:24 -0700 Subject: [PATCH] Backport MRs #1439 and #1440 to fix unapplied settings (#2118152) --- 1439.patch | 65 +++++++++++++++++++++++++++++++++++++++ 1440-rediffed.patch | 53 +++++++++++++++++++++++++++++++ gnome-control-center.spec | 12 ++++++++ 3 files changed, 130 insertions(+) create mode 100644 1439.patch create mode 100644 1440-rediffed.patch diff --git a/1439.patch b/1439.patch new file mode 100644 index 0000000..2a9a8e8 --- /dev/null +++ b/1439.patch @@ -0,0 +1,65 @@ +From 37f5cbe6af5ea71221309669f8b02d5e423956e7 Mon Sep 17 00:00:00 2001 +From: Felipe Borges +Date: Tue, 23 Aug 2022 12:02:56 +0200 +Subject: [PATCH 1/2] power: Fix blank-screen settings not applying + +The AdwComboRow widget has a selected-item property, while we were +connecting to selected-index (which doesn't exist. + +It is likely that selected-index existed in the past in libhandy +or libadwaita and this is a regression during the port to GTK4. + +Fixes #2025 +--- + panels/power/cc-power-panel.ui | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/panels/power/cc-power-panel.ui b/panels/power/cc-power-panel.ui +index d7836e671..d9d0193ce 100644 +--- a/panels/power/cc-power-panel.ui ++++ b/panels/power/cc-power-panel.ui +@@ -151,7 +151,7 @@ + Screen _Blank + Turns the screen off after a period of inactivity. + True +- ++ + + + +-- +GitLab + + +From 3a31e34514e77aeca2b6290be2d77b17ea25d0e6 Mon Sep 17 00:00:00 2001 +From: Felipe Borges +Date: Tue, 23 Aug 2022 12:07:50 +0200 +Subject: [PATCH 2/2] power: Fix "Power Button Behavior" setting now applying + +The AdwComboRow widget has a selected-item property, while we were +connecting to selected-index (which doesn't exist. + +It is likely that selected-index existed in the past in libhandy +or libadwaita and this is a regression during the port to GTK4. + +Fixes #2025 +--- + panels/power/cc-power-panel.ui | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/panels/power/cc-power-panel.ui b/panels/power/cc-power-panel.ui +index d9d0193ce..44c515b95 100644 +--- a/panels/power/cc-power-panel.ui ++++ b/panels/power/cc-power-panel.ui +@@ -199,7 +199,7 @@ + False + Po_wer Button Behavior + True +- ++ + + + +-- +GitLab + diff --git a/1440-rediffed.patch b/1440-rediffed.patch new file mode 100644 index 0000000..fb2eb3f --- /dev/null +++ b/1440-rediffed.patch @@ -0,0 +1,53 @@ +From 37921f8a469fcbb78bb44d3f7d6fd403622e4423 Mon Sep 17 00:00:00 2001 +From: Felipe Borges +Date: Tue, 23 Aug 2022 17:31:31 +0200 +Subject: [PATCH] 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 b361a00a9..6958e1976 100644 +--- a/panels/display/cc-display-panel.c ++++ b/panels/display/cc-display-panel.c +@@ -502,7 +502,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; +@@ -604,7 +604,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 00197bd62..9337b1804 100644 +--- a/panels/display/cc-display-panel.ui ++++ b/panels/display/cc-display-panel.ui +@@ -154,7 +154,7 @@ + + Contains top bar and Activities + Primary Display +- ++ + + + +-- +GitLab + diff --git a/gnome-control-center.spec b/gnome-control-center.spec index 9b8fa6f..46b7618 100644 --- a/gnome-control-center.spec +++ b/gnome-control-center.spec @@ -20,6 +20,18 @@ License: GPLv2+ and CC-BY-SA URL: https://gitlab.gnome.org/GNOME/gnome-control-center/ Source0: https://download.gnome.org/sources/%{name}/43/%{name}-%{tarball_version}.tar.xz +# Bug references for both the following two patches: +# https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2025 +# https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2028 +# https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5767 +# https://bugzilla.redhat.com/show_bug.cgi?id=2118152 +# Fix blank-screen and power button behavior settings not applying +# https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1439 +Patch0: 1439.patch +# Fix primary monitor selection not working +# https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1440 +Patch1: 1440-rediffed.patch + BuildRequires: desktop-file-utils BuildRequires: docbook-style-xsl libxslt BuildRequires: gcc