diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-09-16 14:57:35 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-09-16 14:57:35 -0500 |
commit | 2c4bfbbfa53d62249f350dedbf19676f5003e632 (patch) | |
tree | b59b4fedfe0b5fb24808ff7b4f95d0c27e08f1e4 /src/snap.cpp | |
parent | dc501b4b28452b097da0703cc77867377340ed13 (diff) | |
parent | 790f43bcea23f926f6617e0fe41026a3adaee8cc (diff) | |
download | ayatana-indicator-datetime-2c4bfbbfa53d62249f350dedbf19676f5003e632.tar.gz ayatana-indicator-datetime-2c4bfbbfa53d62249f350dedbf19676f5003e632.tar.bz2 ayatana-indicator-datetime-2c4bfbbfa53d62249f350dedbf19676f5003e632.zip |
sync with trunk
Diffstat (limited to 'src/snap.cpp')
-rw-r--r-- | src/snap.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/snap.cpp b/src/snap.cpp index b3368a1..c2cbc0a 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -94,7 +94,16 @@ public: b.add_hint (uin::Builder::HINT_TINT); b.add_hint (uin::Builder::HINT_NONSHAPEDICON); - const auto timefmt = is_locale_12h() ? _("%a, %l:%M %p") : _("%a, %H:%M"); + const char * timefmt; + if (is_locale_12h()) { + /** strftime(3) format for abbreviated weekday, + hours, minutes in a 12h locale; e.g. Wed, 2:00 PM */ + timefmt = _("%a, %l:%M %p"); + } else { + /** A strftime(3) format for abbreviated weekday, + hours, minutes in a 24h locale; e.g. Wed, 14:00 */ + timefmt = _("%a, %H:%M"); + } const auto timestr = appointment.begin.format(timefmt); auto title = g_strdup_printf(_("Alarm %s"), timestr.c_str()); b.set_title (title); |