[gnome-clocks] Fix edit dialog population in 24h format
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] Fix edit dialog population in 24h format
- Date: Thu, 30 Aug 2012 18:43:04 +0000 (UTC)
commit 761e456a8a300019f924cfe9a458293194caad55
Author: Paolo Borelli <pborelli gnome org>
Date: Thu Aug 30 20:41:21 2012 +0200
Fix edit dialog population in 24h format
gnomeclocks/alarm.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gnomeclocks/alarm.py b/gnomeclocks/alarm.py
index da25233..3a82613 100644
--- a/gnomeclocks/alarm.py
+++ b/gnomeclocks/alarm.py
@@ -199,9 +199,13 @@ class AlarmDialog(Gtk.Dialog):
if alarm:
vevent = alarm.get_vevent()
t = vevent.dtstart.value
- h = int(t.strftime("%I"))
+ if self.cf == "12h":
+ h = int(t.strftime("%I"))
+ p = t.strftime("%p")
+ else:
+ h = int(t.strftime("%H"))
+ p = None
m = int(t.strftime("%M"))
- p = t.strftime("%p")
name = vevent.summary.value
repeat = self.get_repeat_days_from_vevent(vevent)
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]