[gnome-calendar] time-selector: fix AM to PM time logic
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] time-selector: fix AM to PM time logic
- Date: Wed, 27 Jul 2016 19:36:44 +0000 (UTC)
commit d0143db01b205c265b039309558c4100ec61161c
Author: Ernestas Kulik <ernestas kulik gmail com>
Date: Wed Jul 27 22:24:36 2016 +0300
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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-time-selector.c b/src/gcal-time-selector.c
index c9711e8..a5d432f 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]