diff options
| author | Charles Kerr <charles.kerr@canonical.com> | 2014-09-15 21:02:48 +0000 |
|---|---|---|
| committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-09-15 21:02:48 +0000 |
| commit | 851e7e1493ad8268ccef813cb1cc0f7597ee3560 (patch) | |
| tree | 47c0598e5ac78fd037fe12f010f56948c984a1f3 /src/snap.cpp | |
| parent | f337a0fd3b8040d83b2433a8076f70fea345edad (diff) | |
| parent | c0055ef9118a7a284b26d164617985236a2d432a (diff) | |
| download | ayatana-indicator-datetime-851e7e1493ad8268ccef813cb1cc0f7597ee3560.tar.gz ayatana-indicator-datetime-851e7e1493ad8268ccef813cb1cc0f7597ee3560.tar.bz2 ayatana-indicator-datetime-851e7e1493ad8268ccef813cb1cc0f7597ee3560.zip | |
Update the time strings when a powerd Wakeup signal is detected. Fixes: 1359802
Approved by: Ted Gould, PS Jenkins bot
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); |
