summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewerdialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 0763825..2e936f3 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -215,65 +215,67 @@ void KOEventViewerDialog::editIncidence()
215 mSyncResult = 2; 215 mSyncResult = 2;
216 accept(); 216 accept();
217 return; 217 return;
218 } 218 }
219 if ( mIncidence ){ 219 if ( mIncidence ){
220 close(); 220 close();
221 emit editIncidence( mIncidence ); 221 emit editIncidence( mIncidence );
222 } 222 }
223} 223}
224void KOEventViewerDialog::showIncidence() 224void KOEventViewerDialog::showIncidence()
225{ 225{
226 sendSignalViewerClosed = false; 226 sendSignalViewerClosed = false;
227 if ( mSyncMode ) { 227 if ( mSyncMode ) {
228 mSyncResult = 1; 228 mSyncResult = 1;
229 accept(); 229 accept();
230 return; 230 return;
231 } 231 }
232 232
233 if ( mIncidence ){ 233 if ( mIncidence ){
234 QDate date; 234 QDate date;
235 if ( mIncidence->type() == "Todo" ) { 235 if ( mIncidence->type() == "Todo" ) {
236 /* 236 /*
237 if ( ((Todo*)mIncidence)->hasDueDate() ) 237 if ( ((Todo*)mIncidence)->hasDueDate() )
238 date = ((Todo*)mIncidence)->dtDue().date(); 238 date = ((Todo*)mIncidence)->dtDue().date();
239 else { 239 else {
240 globalFlagBlockAgenda = 2; 240 globalFlagBlockAgenda = 2;
241 emit showAgendaView( false ); 241 emit showAgendaView( false );
242 return; 242 return;
243 } 243 }
244 */ 244 */
245 ((Todo*)mIncidence)->setCompleted( true ); 245 ((Todo*)mIncidence)->setCompleted( true );
246 ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() ); 246 ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() );
247 emit todoCompleted(((Todo*)mIncidence)); 247 emit todoCompleted(((Todo*)mIncidence));
248 mEventViewer->setTodo((Todo*)mIncidence);
249 return;
248 } else { 250 } else {
249 date = mIncidence->dtStart().date(); 251 date = mIncidence->dtStart().date();
250 globalFlagBlockAgenda = 1; 252 globalFlagBlockAgenda = 1;
251 emit showAgendaView( false ); 253 emit showAgendaView( false );
252 globalFlagBlockAgenda = 2; 254 globalFlagBlockAgenda = 2;
253 emit jumpToTime( date ); 255 emit jumpToTime( date );
254 } 256 }
255 close(); 257 close();
256 } 258 }
257} 259}
258void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) 260void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e )
259{ 261{
260 switch ( e->key() ) { 262 switch ( e->key() ) {
261 263
262 case Qt::Key_A : 264 case Qt::Key_A :
263 case Qt::Key_L : 265 case Qt::Key_L :
264 showIncidence(); 266 showIncidence();
265 break; 267 break;
266 case Qt::Key_E : 268 case Qt::Key_E :
267 case Qt::Key_R : 269 case Qt::Key_R :
268 editIncidence(); 270 editIncidence();
269 break; 271 break;
270 case Qt::Key_C: 272 case Qt::Key_C:
271 case Qt::Key_Escape: 273 case Qt::Key_Escape:
272 sendSignalViewerClosed = true; 274 sendSignalViewerClosed = true;
273 close(); 275 close();
274 break; 276 break;
275 case Qt::Key_I: 277 case Qt::Key_I:
276#ifndef DESKTOP_VERSION 278#ifndef DESKTOP_VERSION
277 sendSignalViewerClosed = true; 279 sendSignalViewerClosed = true;
278 close(); 280 close();
279#else 281#else