summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index beb19d9..76cce26 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -530,6 +530,11 @@ void CalendarView::suspendAlarm()
void CalendarView::startAlarm( QString mess , QString filename)
{
+
+ topLevelWidget()->showNormal();
+ topLevelWidget()->setActiveWindow();
+ topLevelWidget()->raise();
+
mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount );
QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) );
@@ -4094,7 +4099,7 @@ void CalendarView::showNextAlarms()
int days = hours /24;
hours = hours % 24;
- message = i18n("The next alarm is in:\n");
+ //message = i18n("The next alarm is in:\n");
if ( days > 1 )
message += i18n("%1 days\n").arg( days );
else if ( days == 1 )
@@ -4107,11 +4112,21 @@ void CalendarView::showNextAlarms()
message += i18n("%1 minutes\n").arg( min );
else if ( min == 1 )
message += i18n("1 minute\n");
-
+ if ( message.isEmpty() )
+ message = i18n("The next alarm is in\nless than one minute!");
+ else
+ message = i18n("The next alarm is in:\n") + message;
message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ;
} else {
message = i18n("There is no next alarm.");
}
+#ifdef DESKTOP_VERSION
+ if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
+ message += i18n("\nThe internal alarm notification is disabled!\n");
+ message += i18n("Enable it in the settings menu, TAB alarm.");
+ }
+
+#endif
KMessageBox::information( this, message);
}