aboutsummaryrefslogtreecommitdiff
path: root/src/datetime-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-03-30 16:50:04 -0500
committerTed Gould <ted@gould.cx>2011-03-30 16:50:04 -0500
commite8d074ffc39904e5095623c8c865e32a1fffecc8 (patch)
tree50ca365d5e33ae972cf39b23603ebde7c237a9e8 /src/datetime-service.c
parent0716a8cbc3b51a4dc733042182163d3a229616fe (diff)
downloadayatana-indicator-datetime-e8d074ffc39904e5095623c8c865e32a1fffecc8.tar.gz
ayatana-indicator-datetime-e8d074ffc39904e5095623c8c865e32a1fffecc8.tar.bz2
ayatana-indicator-datetime-e8d074ffc39904e5095623c8c865e32a1fffecc8.zip
Be a bit smarter about handling the the locale
Diffstat (limited to 'src/datetime-service.c')
-rw-r--r--src/datetime-service.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 5172eea..9eb26e8 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -749,7 +749,11 @@ update_appointment_menu_items (gpointer user_data)
} else if (g_strcmp0(time_format_str, "24-hour") == 0) {
apt_output = SETTINGS_TIME_24_HOUR;
} else {
- apt_output = SETTINGS_TIME_LOCALE;
+ if (is_locale_12h()) {
+ apt_output = SETTINGS_TIME_12_HOUR;
+ } else {
+ apt_output = SETTINGS_TIME_24_HOUR;
+ }
}
GVariantBuilder markeddays;
@@ -833,11 +837,6 @@ update_appointment_menu_items (gpointer user_data)
strftime(right, 20, _(DEFAULT_TIME_24_FORMAT), due);
else
strftime(right, 20, _(DEFAULT_TIME_24_FORMAT_WITH_DAY), due);
- } else {
- if ((mday == dmday) && (mon == dmon) && (year == dyear))
- strftime(right, 20, _(DEFAULT_TIME_FORMAT), due);
- else
- strftime(right, 20, _(DEFAULT_TIME_FORMAT_WITH_DAY), due);
}
g_debug("Appointment time: %s, for date %s", right, asctime(due));
dbusmenu_menuitem_property_set (item, APPOINTMENT_MENUITEM_PROP_RIGHT, right);