summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventviewerdialog.cpp
authorzautrix <zautrix>2004-09-09 21:22:38 (UTC)
committer zautrix <zautrix>2004-09-09 21:22:38 (UTC)
commit10eb314475b75a162582e8138d465890dbd21806 (patch) (side-by-side diff)
tree9045f8a02113eedf2f2c59d239e4e43b41c2cdc5 /korganizer/koeventviewerdialog.cpp
parent5b0e3c87bbe32aacd51f6faff5446ed3838a68e0 (diff)
downloadkdepimpi-10eb314475b75a162582e8138d465890dbd21806.zip
kdepimpi-10eb314475b75a162582e8138d465890dbd21806.tar.gz
kdepimpi-10eb314475b75a162582e8138d465890dbd21806.tar.bz2
Fixed closing of event viewer
Diffstat (limited to 'korganizer/koeventviewerdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewerdialog.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index be183eb..68c0e1a 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -166,74 +166,75 @@ void KOEventViewerDialog::setJournal(Journal *j)
}
void KOEventViewerDialog::addText(QString text)
{
mEventViewer->addText(text);
findButton( Close )->setFocus();
}
void KOEventViewerDialog::editIncidence()
{
if ( mSyncMode ) {
mSyncResult = 2;
accept();
return;
}
if ( mIncidence ){
#ifndef DESKTOP_VERSION
hide();
#endif
emit editIncidence( mIncidence );
}
}
void KOEventViewerDialog::showIncidence()
{
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;
}
} else
date = mIncidence->dtStart().date();
globalFlagBlockAgenda = 1;
emit showAgendaView( false );
globalFlagBlockAgenda = 2;
emit jumpToTime( date );
}
}
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:
close();
break;
case Qt::Key_I:
accept();
break;
default:
break;
}
}