Formatted alarm message (closes ticket #46).
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Tue, 16 Apr 2013 21:01:40 +0000 (21:01 +0000)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Tue, 16 Apr 2013 21:01:40 +0000 (21:01 +0000)
src/gui/mainwindow.cpp

index b20b3ba..c01b4f4 100644 (file)
@@ -234,13 +234,13 @@ void MainWindow::onAlarmTimerTimeout() {
     QString message;
     if (events.size() == 1) {
         event = events.first();
-        title = tr("Next event at %1").arg(event.start().toString());
-        message = tr("Title: %1\nRoom: %2").arg(event.title()).arg(event.room()->name());
+        title = tr("Next event at %1").arg(event.start().toString("HH:mm"));
+        message = tr("\"%1\"\n(%2)").arg(event.title()).arg(event.room()->name());
     } else {
         title = tr("%1 upcoming events").arg(events.size());
         QStringList messages;
         foreach (event, events) {
-            messages += tr("Start: %1; Title: %2; Room: %3").arg(event.start().toString()).arg(event.title()).arg(event.room()->name());
+            messages += tr("%1: \"%2\" (%3)").arg(event.start().toString("HH:mm")).arg(event.title()).arg(event.room()->name());
         }
         message = messages.join("\n");
     }