Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index d06a405..fc189bd 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -1007,39 +1007,38 @@ void MainWindow::doAlarm( const QDateTime& dt, int uid ) { | |||
1007 | bool loud = false; | 1007 | bool loud = false; |
1008 | OPimNotifyManager::Alarms als = todo.notifiers().alarms(); | 1008 | OPimNotifyManager::Alarms als = todo.notifiers().alarms(); |
1009 | OPimNotifyManager::Alarms::Iterator it; | 1009 | OPimNotifyManager::Alarms::Iterator it; |
1010 | for ( it = als.begin(); it != als.end(); ++it ) { | 1010 | for ( it = als.begin(); it != als.end(); ++it ) { |
1011 | if ( (*it).dateTime() == dt ) { | 1011 | if ( (*it).dateTime() == dt ) { |
1012 | loud = ( (*it).sound() == OPimAlarm::Loud ); | 1012 | loud = ( (*it).sound() == OPimAlarm::Loud ); |
1013 | break; | 1013 | break; |
1014 | } | 1014 | } |
1015 | } | 1015 | } |
1016 | if (loud) | 1016 | if (loud) |
1017 | startAlarm(); | 1017 | startAlarm(); |
1018 | 1018 | ||
1019 | QDialog dlg(this, 0, TRUE ); | 1019 | QDialog dlg(this, 0, TRUE ); |
1020 | QVBoxLayout* lay = new QVBoxLayout( &dlg ); | 1020 | QVBoxLayout* lay = new QVBoxLayout( &dlg ); |
1021 | QTextView* view = new QTextView( &dlg ); | 1021 | QTextView* view = new QTextView( &dlg ); |
1022 | lay->addWidget( view ); | 1022 | lay->addWidget( view ); |
1023 | QPushButton* btnOk = new QPushButton( tr("Ok"), &dlg ); | 1023 | QPushButton* btnOk = new QPushButton( tr("Ok"), &dlg ); |
1024 | connect( btnOk, SIGNAL(clicked() ), &dlg, SLOT(accept() ) ); | 1024 | connect( btnOk, SIGNAL(clicked() ), &dlg, SLOT(accept() ) ); |
1025 | lay->addWidget( btnOk ); | 1025 | lay->addWidget( btnOk ); |
1026 | 1026 | ||
1027 | QString text = tr("<h1>Alarm at %1</h1><br>").arg( TimeString::dateString( dt ) ); | 1027 | QString text = tr("<h1>Alarm at %1</h1><br>").arg( TimeString::dateString( dt ) ); |
1028 | text += todo.toRichText(); | 1028 | text += todo.toRichText(); |
1029 | view->setText( text ); | 1029 | view->setText( text ); |
1030 | 1030 | ||
1031 | dlg.showMaximized(); | 1031 | bool needToStay = QPEApplication::execDialog( &dlg ); |
1032 | bool needToStay = dlg.exec(); | ||
1033 | 1032 | ||
1034 | if (loud) | 1033 | if (loud) |
1035 | killAlarm(); | 1034 | killAlarm(); |
1036 | 1035 | ||
1037 | if (needToStay) { | 1036 | if (needToStay) { |
1038 | // showMaximized(); | 1037 | // showMaximized(); |
1039 | // raise(); | 1038 | // raise(); |
1040 | QPEApplication::setKeepRunning(); | 1039 | QPEApplication::setKeepRunning(); |
1041 | // setActiveWindow(); | 1040 | // setActiveWindow(); |
1042 | } | 1041 | } |
1043 | 1042 | ||
1044 | } | 1043 | } |
1045 | 1044 | ||