diff options
author | Tomas Ogren <stric@ing.umu.se> | 1999-03-27 01:07:10 +0800 |
---|---|---|
committer | Tomas Ă–gren <stric@src.gnome.org> | 1999-03-27 01:07:10 +0800 |
commit | cdc2ca8e2ab272878121a2179cdb7717aa2cd141 (patch) | |
tree | e3a32206ce7c65234a184662dbf8d6b464976f2e | |
parent | 8ee4abace3191bf02cc1bc6afce5a8ade174a92c (diff) | |
download | gsoc2013-evolution-cdc2ca8e2ab272878121a2179cdb7717aa2cd141.tar gsoc2013-evolution-cdc2ca8e2ab272878121a2179cdb7717aa2cd141.tar.gz gsoc2013-evolution-cdc2ca8e2ab272878121a2179cdb7717aa2cd141.tar.bz2 gsoc2013-evolution-cdc2ca8e2ab272878121a2179cdb7717aa2cd141.tar.lz gsoc2013-evolution-cdc2ca8e2ab272878121a2179cdb7717aa2cd141.tar.xz gsoc2013-evolution-cdc2ca8e2ab272878121a2179cdb7717aa2cd141.tar.zst gsoc2013-evolution-cdc2ca8e2ab272878121a2179cdb7717aa2cd141.zip |
Made it respect 12/24h settings.. Doesn't show until next time you open
1999-03-26 Tomas Ogren <stric@ing.umu.se>
* prop.c (build_hours_menu): Made it respect 12/24h settings..
Doesn't show until next time you open the dialog.. yet..
svn path=/trunk/; revision=780
-rw-r--r-- | calendar/ChangeLog | 5 | ||||
-rw-r--r-- | calendar/gui/prop.c | 7 | ||||
-rw-r--r-- | calendar/prop.c | 7 |
3 files changed, 17 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index f148237d57..4654268578 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +1999-03-26 Tomas Ogren <stric@ing.umu.se> + + * prop.c (build_hours_menu): Made it respect 12/24h settings.. + Doesn't show until next time you open the dialog.. yet.. + 1999-03-24 Tomas Ogren <stric@ing.umu.se> * gncal-week-view.c (gncal_week_view_set): Did some i18n work diff --git a/calendar/gui/prop.c b/calendar/gui/prop.c index dd5130fa1a..ee97c58514 100644 --- a/calendar/gui/prop.c +++ b/calendar/gui/prop.c @@ -236,15 +236,20 @@ build_hours_menu (GtkWidget **items, int active) int i; char buf[100]; struct tm tm; + int am_pm_flag; omenu = gtk_option_menu_new (); menu = gtk_menu_new (); + am_pm_flag = GTK_TOGGLE_BUTTON (time_format_12)->active; memset (&tm, 0, sizeof (tm)); for (i = 0; i < 24; i++) { tm.tm_hour = i; - strftime (buf, 100, "%I:%M %p", &tm); + if (am_pm_flag) + strftime (buf, 100, "%I:%M %p", &tm); + else + strftime (buf, 100, "%H:%M", &tm); items[i] = gtk_menu_item_new_with_label (buf); gtk_object_set_user_data (GTK_OBJECT (items[i]), GINT_TO_POINTER (i)); diff --git a/calendar/prop.c b/calendar/prop.c index dd5130fa1a..ee97c58514 100644 --- a/calendar/prop.c +++ b/calendar/prop.c @@ -236,15 +236,20 @@ build_hours_menu (GtkWidget **items, int active) int i; char buf[100]; struct tm tm; + int am_pm_flag; omenu = gtk_option_menu_new (); menu = gtk_menu_new (); + am_pm_flag = GTK_TOGGLE_BUTTON (time_format_12)->active; memset (&tm, 0, sizeof (tm)); for (i = 0; i < 24; i++) { tm.tm_hour = i; - strftime (buf, 100, "%I:%M %p", &tm); + if (am_pm_flag) + strftime (buf, 100, "%I:%M %p", &tm); + else + strftime (buf, 100, "%H:%M", &tm); items[i] = gtk_menu_item_new_with_label (buf); gtk_object_set_user_data (GTK_OBJECT (items[i]), GINT_TO_POINTER (i)); |