From 9dfaca3725b454bb002418f0f51394714f658570 Mon Sep 17 00:00:00 2001 From: Mohammed Sadiq Date: Thu, 20 Jan 2022 22:19:30 +0530 Subject: [PATCH] common: time-entry: Fix changing time clicking the buttons The change-value signal was not handled when emitted. Add a handler to handle the signal and update time as needed. --- panels/common/cc-time-entry.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/panels/common/cc-time-entry.c b/panels/common/cc-time-entry.c index 220385648c..934c6cb63a 100644 --- a/panels/common/cc-time-entry.c +++ b/panels/common/cc-time-entry.c @@ -265,6 +265,19 @@ change_value_cb (GtkWidget *widget, return GDK_EVENT_STOP; } +static void +value_changed_cb (CcTimeEntry *self, + GtkScrollType type) +{ + g_autoptr(GVariant) value; + + g_assert (CC_IS_TIME_ENTRY (self)); + + value = g_variant_new_int32 (type); + + change_value_cb (GTK_WIDGET (self), value, NULL); +} + static void on_text_cut_clipboard_cb (GtkText *text, CcTimeEntry *self) @@ -525,6 +538,8 @@ cc_time_entry_init (CcTimeEntry *self) "signal::paste-clipboard", on_text_paste_clipboard_cb, self, "signal::toggle-overwrite", on_text_toggle_overwrite_cb, self, NULL); + g_signal_connect (self, "change-value", + G_CALLBACK (value_changed_cb), self); } GtkWidget *