From d0143db01b205c265b039309558c4100ec61161c Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Wed, 27 Jul 2016 22:24:36 +0300 Subject: [PATCH] time-selector: fix AM to PM time logic Currently, the hour component of the time is doubled when switching from AM to PM, which is incorrect. This commit fixes the logic by adding 12 hours when switching to PM. https://bugzilla.gnome.org/show_bug.cgi?id=765370 --- src/gcal-time-selector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gcal-time-selector.c b/src/gcal-time-selector.c index c9711e88..a5d432f2 100644 --- a/src/gcal-time-selector.c +++ b/src/gcal-time-selector.c @@ -106,7 +106,7 @@ update_time (GcalTimeSelector *selector) g_signal_handlers_block_by_func (selector->period_combo, update_time, selector); gtk_combo_box_set_active (GTK_COMBO_BOX (selector->period_combo), hour > 12); - hour *= 2; + hour += 12; g_signal_handlers_unblock_by_func (selector->period_combo, update_time, selector); }