aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-02-04 14:10:41 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-02-04 14:10:41 -0600
commit4a563742f7d1232af2fe23c2b89165943328e134 (patch)
tree54b7729a452d3e61f857d386eef5ca77bc9c1d28 /src
parent61581201f13509fbce9eb05fc90a5da17307c6a3 (diff)
downloadayatana-indicator-datetime-4a563742f7d1232af2fe23c2b89165943328e134.tar.gz
ayatana-indicator-datetime-4a563742f7d1232af2fe23c2b89165943328e134.tar.bz2
ayatana-indicator-datetime-4a563742f7d1232af2fe23c2b89165943328e134.zip
use %X for showing the appointment time in the title
Diffstat (limited to 'src')
-rw-r--r--src/snap.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/snap.cpp b/src/snap.cpp
index 5f46dc7..60811d2 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -20,7 +20,6 @@
#include <datetime/appointment.h>
#include <datetime/formatter.h>
#include <datetime/snap.h>
-#include <datetime/utils.h> // generate_full_format_string_at_time()
#include <canberra.h>
#include <libnotify/notify.h>
@@ -122,8 +121,8 @@ void show_snap_decision(SnapData* data)
{
const Appointment& appointment = data->appointment;
- auto timestr = generate_full_format_string_at_time(appointment.begin.get(), nullptr, nullptr);
- auto title = g_strdup_printf(_("Alarm %s"), timestr);
+ const auto timestr = appointment.begin.format("%a, %X");
+ auto title = g_strdup_printf(_("Alarm %s"), timestr.c_str());
const auto body = appointment.summary;
const gchar* icon_name = "alarm-clock";
@@ -144,7 +143,6 @@ void show_snap_decision(SnapData* data)
}
g_free(title);
- g_free(timestr);
}
/**