aboutsummaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/datetime-service.c11
-rw-r--r--src/settings-shared.h2
2 files changed, 6 insertions, 7 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);
diff --git a/src/settings-shared.h b/src/settings-shared.h
index 47ee6ef..8c36ae3 100644
--- a/src/settings-shared.h
+++ b/src/settings-shared.h
@@ -50,7 +50,7 @@ enum {
a clock showing 24-hour time without seconds. */
#define DEFAULT_TIME_24_FORMAT N_("%H:%M")
-#define DEFAULT_TIME_FORMAT DEFAULT_TIME_12_FORMAT
+#define DEFAULT_TIME_FORMAT DEFAULT_TIME_12_FORMAT
#define DEFAULT_TIME_FORMAT_WITH_DAY DEFAULT_TIME_12_FORMAT_WITH_DAY
/* TRANSLATORS: A format string for the strftime function for