From 7357c8fbeafece1a31a57c7483e47fc3964ecd68 Mon Sep 17 00:00:00 2001 From: David Barth Date: Wed, 3 Feb 2016 15:47:29 +0100 Subject: adjust title and notification icon according to the event type --- src/snap.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/snap.cpp') diff --git a/src/snap.cpp b/src/snap.cpp index 934ad19..9c2b4b6 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -122,7 +122,7 @@ public: const auto minutes = std::chrono::minutes(m_settings->alarm_duration.get()); ain::Builder b; b.set_body (appointment.summary); - b.set_icon_name ("alarm-clock"); + b.set_icon_name (appointment.is_ubuntu_alarm() ? "alarm-clock" : "reminder"); b.add_hint (ain::Builder::HINT_NONSHAPED_ICON); const char * timefmt; @@ -136,7 +136,14 @@ public: timefmt = _("%a, %H:%M"); } const auto timestr = appointment.begin.format(timefmt); - auto title = g_strdup_printf(_("Alarm %s"), timestr.c_str()); + + const char * titlefmt; + if (appointment.is_ubuntu_alarm()) { + titlefmt = _("Alarm %s"); + } else { + titlefmt = _("Event %s"); + } + auto title = g_strdup_printf(titlefmt, timestr.c_str()); b.set_title (title); g_free (title); b.set_timeout (std::chrono::duration_cast(minutes)); -- cgit v1.2.3