Accepting request 1166684 from GNOME:Factory
OBS-URL: https://build.opensuse.org/request/show/1166684 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-control-center?expand=0&rev=244
This commit is contained in:
commit
465167c08b
@ -0,0 +1,77 @@
|
||||
From 535404bba267c7c542ed68641e309665171b29ff Mon Sep 17 00:00:00 2001
|
||||
From: Xiaoguang Wang <xwang@suse.com>
|
||||
Date: Wed, 3 Apr 2024 12:46:24 +0800
|
||||
Subject: [PATCH] datetime: Avoid emitting the time-changed signal
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When setting the widget value, don’t emit the time-changed signal.
|
||||
|
||||
Fixes #2943
|
||||
---
|
||||
panels/system/datetime/cc-datetime-page.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/panels/system/datetime/cc-datetime-page.c b/panels/system/datetime/cc-datetime-page.c
|
||||
index c20960506..25dac113c 100644
|
||||
--- a/panels/system/datetime/cc-datetime-page.c
|
||||
+++ b/panels/system/datetime/cc-datetime-page.c
|
||||
@@ -206,6 +206,10 @@ clock_settings_changed_cb (CcDateTimePage *self,
|
||||
g_signal_handlers_unblock_by_func (self->ampm_format_button, change_clock_settings, self);
|
||||
}
|
||||
|
||||
+static void on_month_selection_changed_cb (CcDateTimePage *self);
|
||||
+
|
||||
+static void time_changed_cb (CcDateTimePage *self,
|
||||
+ CcTimeEditor *editor);
|
||||
|
||||
/* Update the widgets based on the system time */
|
||||
static void
|
||||
@@ -219,9 +223,11 @@ update_time (CcDateTimePage *self)
|
||||
else
|
||||
use_ampm = FALSE;
|
||||
|
||||
+ g_signal_handlers_block_by_func (self->time_editor, time_changed_cb, self);
|
||||
cc_time_editor_set_time (self->time_editor,
|
||||
g_date_time_get_hour (self->date),
|
||||
g_date_time_get_minute (self->date));
|
||||
+ g_signal_handlers_unblock_by_func (self->time_editor, time_changed_cb, self);
|
||||
|
||||
/* Update the time on the listbow row */
|
||||
if (use_ampm)
|
||||
@@ -236,7 +242,9 @@ update_time (CcDateTimePage *self)
|
||||
}
|
||||
|
||||
self->month = g_date_time_get_month (self->date);
|
||||
+ g_signal_handlers_block_by_func (self->month_model, on_month_selection_changed_cb, self);
|
||||
gtk_single_selection_set_selected (self->month_model, self->month - 1);
|
||||
+ g_signal_handlers_unblock_by_func (self->month_model, on_month_selection_changed_cb, self);
|
||||
cc_list_row_set_secondary_label (self->datetime_row, label);
|
||||
}
|
||||
|
||||
@@ -362,9 +370,11 @@ change_date (CcDateTimePage *self)
|
||||
g_date_time_get_hour (old_date),
|
||||
g_date_time_get_minute (old_date),
|
||||
g_date_time_get_second (old_date));
|
||||
+ g_signal_handlers_block_by_func (self->time_editor, time_changed_cb, self);
|
||||
cc_time_editor_set_time (self->time_editor,
|
||||
g_date_time_get_hour (self->date),
|
||||
g_date_time_get_minute (self->date));
|
||||
+ g_signal_handlers_unblock_by_func (self->time_editor, time_changed_cb, self);
|
||||
|
||||
queue_set_datetime (self);
|
||||
}
|
||||
@@ -741,7 +751,9 @@ setup_datetime_dialog (CcDateTimePage *self)
|
||||
|
||||
/* Month */
|
||||
self->month = g_date_time_get_month (self->date);
|
||||
+ g_signal_handlers_block_by_func (self->month_model, on_month_selection_changed_cb, self);
|
||||
gtk_single_selection_set_selected (self->month_model, self->month - 1);
|
||||
+ g_signal_handlers_unblock_by_func (self->month_model, on_month_selection_changed_cb, self);
|
||||
}
|
||||
|
||||
static int
|
||||
--
|
||||
2.44.0
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 8 03:14:11 UTC 2024 - Xiaoguang Wang <xiaoguang.wang@suse.com>
|
||||
|
||||
- Add gnome-control-center-datetime-Avoid-emitting-the-time-changed-signal.patch:
|
||||
Avoid emitting the time-changed signal
|
||||
(bsc#1222149, bsc#1221799, glgo#GNOME/gnome-control-center#2943).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 27 18:23:40 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
@ -37,6 +37,8 @@ Source99: %{name}-rpmlintrc
|
||||
|
||||
# PATCH-FIX-OPENSUSE gnome-control-center-disable-error-message-for-NM.patch bsc#989801 sckang@suse.com -- network: Improve the check for whether NM or wicked is running
|
||||
Patch1: gnome-control-center-disable-error-message-for-NM.patch
|
||||
# PATCH-FIX-UPSTREAM gnome-control-center-datetime-Avoid-emitting-the-time-changed-signal.patch bsc#1222149 glgo#GNOME/gnome-control-center#2943 xwang@suse.com -- Avoid emitting the time-changed signal
|
||||
Patch2: gnome-control-center-datetime-Avoid-emitting-the-time-changed-signal.patch
|
||||
|
||||
### patches for Leap >= 15 plus SLE >= 15, but not TW
|
||||
# PATCH-FEATURE-SLE gnome-control-center-info-never-use-gnome-software.patch bsc#999336 fezhang@suse.com -- info: Never search for gnome-software as an option when checking for updates on SLE and Leap 42.2, because we use gpk-update-viewer.
|
||||
@ -195,6 +197,7 @@ GNOME control center.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -P 1 -p1
|
||||
%patch -P 2 -p1
|
||||
|
||||
# patches for Leap >= 15 plus SLE >= 15, but not TW
|
||||
%if 0%{?sle_version} >= 150000
|
||||
|
Loading…
Reference in New Issue
Block a user