Backport MRs #1439 and #1440 to fix unapplied settings (#2118152)

This commit is contained in:
Adam Williamson 2022-08-30 12:16:24 -07:00
parent 03d099ab94
commit 1704beda95
3 changed files with 130 additions and 0 deletions

65
1439.patch Normal file
View File

@ -0,0 +1,65 @@
From 37f5cbe6af5ea71221309669f8b02d5e423956e7 Mon Sep 17 00:00:00 2001
From: Felipe Borges <felipeborges@gnome.org>
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 @@
<property name="title" translatable="yes">Screen _Blank</property>
<property name="subtitle" translatable="yes">Turns the screen off after a period of inactivity.</property>
<property name="use_underline">True</property>
- <signal name="notify::selected-index" handler="blank_screen_row_changed_cb" object="CcPowerPanel" swapped="yes"/>
+ <signal name="notify::selected-item" handler="blank_screen_row_changed_cb" object="CcPowerPanel" swapped="yes"/>
</object>
</child>
<child>
--
GitLab
From 3a31e34514e77aeca2b6290be2d77b17ea25d0e6 Mon Sep 17 00:00:00 2001
From: Felipe Borges <felipeborges@gnome.org>
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 @@
<property name="visible">False</property>
<property name="title" translatable="yes">Po_wer Button Behavior</property>
<property name="use_underline">True</property>
- <signal name="notify::selected-index" handler="power_button_row_changed_cb" object="CcPowerPanel" swapped="yes"/>
+ <signal name="notify::selected-item" handler="power_button_row_changed_cb" object="CcPowerPanel" swapped="yes"/>
</object>
</child>
<child>
--
GitLab

53
1440-rediffed.patch Normal file
View File

@ -0,0 +1,53 @@
From 37921f8a469fcbb78bb44d3f7d6fd403622e4423 Mon Sep 17 00:00:00 2001
From: Felipe Borges <felipeborges@gnome.org>
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 @@
<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>
--
GitLab

View File

@ -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