From 4a563742f7d1232af2fe23c2b89165943328e134 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 4 Feb 2014 14:10:41 -0600 Subject: use %X for showing the appointment time in the title --- src/snap.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/snap.cpp') 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 #include #include -#include // generate_full_format_string_at_time() #include #include @@ -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); } /** -- cgit v1.2.3