author | zautrix <zautrix> | 2005-04-14 18:55:22 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-14 18:55:22 (UTC) |
commit | 2a449f785f955649df9de639d38dcb250fe1376d (patch) (side-by-side diff) | |
tree | 41aa30a1267ca70f4b9b8c07be26b3c577dc2874 /korganizer/koeventviewerdialog.cpp | |
parent | d334d77ab00b91b9527bb5992b476c656c88b2fa (diff) | |
download | kdepimpi-2a449f785f955649df9de639d38dcb250fe1376d.zip kdepimpi-2a449f785f955649df9de639d38dcb250fe1376d.tar.gz kdepimpi-2a449f785f955649df9de639d38dcb250fe1376d.tar.bz2 |
fixxx
Diffstat (limited to 'korganizer/koeventviewerdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 1dce841..baa11b5 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -188,122 +188,120 @@ void KOEventViewerDialog::setTodo(Todo *event) //findButton( Close )->setFocus(); if ( !mSyncMode ) { findButton( User1 )->setText( i18n("Set complete")); } } void KOEventViewerDialog::setJournal(Journal *j) { mEventViewer->setJournal(j); mIncidence = (Incidence*)j; mEventViewer->setFocus(); //findButton( Close )->setFocus(); if ( !mSyncMode ) { findButton( User1 )->setText( i18n("Agenda")); } } void KOEventViewerDialog::addText(QString text) { mEventViewer->addText(text); mEventViewer->setFocus(); //findButton( Close )->setFocus(); } void KOEventViewerDialog::editIncidence() { sendSignalViewerClosed = false; if ( mSyncMode ) { mSyncResult = 2; accept(); return; } if ( mIncidence ){ #ifndef DESKTOP_VERSION //hide(); close(); #endif emit editIncidence( mIncidence ); } } void KOEventViewerDialog::showIncidence() { sendSignalViewerClosed = false; if ( mSyncMode ) { mSyncResult = 1; accept(); return; } if ( mIncidence ){ -#ifndef DESKTOP_VERSION - hide(); -#endif QDate date; if ( mIncidence->type() == "Todo" ) { /* if ( ((Todo*)mIncidence)->hasDueDate() ) date = ((Todo*)mIncidence)->dtDue().date(); else { globalFlagBlockAgenda = 2; emit showAgendaView( false ); return; } */ ((Todo*)mIncidence)->setCompleted( true ); ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() ); - hide(); emit todoCompleted(((Todo*)mIncidence)); - return; - - } else + } else { date = mIncidence->dtStart().date(); - globalFlagBlockAgenda = 1; - emit showAgendaView( false ); - globalFlagBlockAgenda = 2; - emit jumpToTime( date ); + globalFlagBlockAgenda = 1; + emit showAgendaView( false ); + globalFlagBlockAgenda = 2; + emit jumpToTime( date ); + } +#ifndef DESKTOP_VERSION + reject(); +#endif } } void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) { switch ( e->key() ) { case Qt::Key_A : case Qt::Key_L : showIncidence(); break; case Qt::Key_E : case Qt::Key_R : editIncidence(); break; case Qt::Key_C: case Qt::Key_Escape: sendSignalViewerClosed = true; close(); break; case Qt::Key_I: #ifndef DESKTOP_VERSION sendSignalViewerClosed = true; close(); #else sendSignalViewerClosed = true; slotViewerClosed(); //accept(); #endif break; default: KDialogBase::keyPressEvent ( e ); break; } } void KOEventViewerDialog::hideEvent ( QHideEvent * e ) { KDialogBase::hideEvent ( e ); QTimer::singleShot( 1, this, SLOT (slotViewerClosed() ) ); } void KOEventViewerDialog::slotViewerClosed() { if ( mSyncMode ) return; if ( sendSignalViewerClosed ) { //qDebug("KOEventViewerDialog::hideEvent "); |