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
This commit is contained in:
Ernestas Kulik
2016-07-27 16:36:36 -03:00
committed by Georges Basile Stavracas Neto
parent dd4142f255
commit d0143db01b
+1 -1
View File
@@ -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);
}