Diffstat (limited to 'korganizer/koeventviewerdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index e2c8e6e..f606124 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp | |||
@@ -217,76 +217,82 @@ void KOEventViewerDialog::showIncidence() | |||
217 | mSyncResult = 1; | 217 | mSyncResult = 1; |
218 | accept(); | 218 | accept(); |
219 | return; | 219 | return; |
220 | } | 220 | } |
221 | 221 | ||
222 | if ( mIncidence ){ | 222 | if ( mIncidence ){ |
223 | #ifndef DESKTOP_VERSION | 223 | #ifndef DESKTOP_VERSION |
224 | hide(); | 224 | hide(); |
225 | #endif | 225 | #endif |
226 | QDate date; | 226 | QDate date; |
227 | if ( mIncidence->type() == "Todo" ) { | 227 | if ( mIncidence->type() == "Todo" ) { |
228 | /* | 228 | /* |
229 | if ( ((Todo*)mIncidence)->hasDueDate() ) | 229 | if ( ((Todo*)mIncidence)->hasDueDate() ) |
230 | date = ((Todo*)mIncidence)->dtDue().date(); | 230 | date = ((Todo*)mIncidence)->dtDue().date(); |
231 | else { | 231 | else { |
232 | globalFlagBlockAgenda = 2; | 232 | globalFlagBlockAgenda = 2; |
233 | emit showAgendaView( false ); | 233 | emit showAgendaView( false ); |
234 | return; | 234 | return; |
235 | } | 235 | } |
236 | */ | 236 | */ |
237 | ((Todo*)mIncidence)->setCompleted( true ); | 237 | ((Todo*)mIncidence)->setCompleted( true ); |
238 | ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() ); | 238 | ((Todo*)mIncidence)->setCompleted(QDateTime::currentDateTime() ); |
239 | hide(); | 239 | hide(); |
240 | emit todoCompleted(((Todo*)mIncidence)); | 240 | emit todoCompleted(((Todo*)mIncidence)); |
241 | return; | 241 | return; |
242 | 242 | ||
243 | } else | 243 | } else |
244 | date = mIncidence->dtStart().date(); | 244 | date = mIncidence->dtStart().date(); |
245 | globalFlagBlockAgenda = 1; | 245 | globalFlagBlockAgenda = 1; |
246 | emit showAgendaView( false ); | 246 | emit showAgendaView( false ); |
247 | globalFlagBlockAgenda = 2; | 247 | globalFlagBlockAgenda = 2; |
248 | emit jumpToTime( date ); | 248 | emit jumpToTime( date ); |
249 | } | 249 | } |
250 | } | 250 | } |
251 | void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) | 251 | void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) |
252 | { | 252 | { |
253 | switch ( e->key() ) { | 253 | switch ( e->key() ) { |
254 | 254 | ||
255 | case Qt::Key_A : | 255 | case Qt::Key_A : |
256 | case Qt::Key_L : | 256 | case Qt::Key_L : |
257 | showIncidence(); | 257 | showIncidence(); |
258 | break; | 258 | break; |
259 | case Qt::Key_E : | 259 | case Qt::Key_E : |
260 | case Qt::Key_R : | 260 | case Qt::Key_R : |
261 | editIncidence(); | 261 | editIncidence(); |
262 | break; | 262 | break; |
263 | case Qt::Key_C: | 263 | case Qt::Key_C: |
264 | case Qt::Key_Escape: | 264 | case Qt::Key_Escape: |
265 | sendSignalViewerClosed = true; | ||
265 | close(); | 266 | close(); |
266 | break; | 267 | break; |
267 | case Qt::Key_I: | 268 | case Qt::Key_I: |
269 | #ifndef DESKTOP_VERSION | ||
270 | sendSignalViewerClosed = true; | ||
271 | close(); | ||
272 | #else | ||
268 | sendSignalViewerClosed = true; | 273 | sendSignalViewerClosed = true; |
269 | slotViewerClosed(); | 274 | slotViewerClosed(); |
270 | //accept(); | 275 | //accept(); |
276 | #endif | ||
271 | break; | 277 | break; |
272 | default: | 278 | default: |
273 | KDialogBase::keyPressEvent ( e ); | 279 | KDialogBase::keyPressEvent ( e ); |
274 | break; | 280 | break; |
275 | } | 281 | } |
276 | 282 | ||
277 | } | 283 | } |
278 | void KOEventViewerDialog::hideEvent ( QHideEvent * e ) | 284 | void KOEventViewerDialog::hideEvent ( QHideEvent * e ) |
279 | { | 285 | { |
280 | KDialogBase::hideEvent ( e ); | 286 | KDialogBase::hideEvent ( e ); |
281 | QTimer::singleShot( 1, this, SLOT (slotViewerClosed() ) ); | 287 | QTimer::singleShot( 1, this, SLOT (slotViewerClosed() ) ); |
282 | } | 288 | } |
283 | 289 | ||
284 | void KOEventViewerDialog::slotViewerClosed() | 290 | void KOEventViewerDialog::slotViewerClosed() |
285 | { | 291 | { |
286 | if ( sendSignalViewerClosed ) { | 292 | if ( sendSignalViewerClosed ) { |
287 | //qDebug("KOEventViewerDialog::hideEvent "); | 293 | //qDebug("KOEventViewerDialog::hideEvent "); |
288 | emit signalViewerClosed(); | 294 | emit signalViewerClosed(); |
289 | } | 295 | } |
290 | sendSignalViewerClosed = true; | 296 | sendSignalViewerClosed = true; |
291 | } | 297 | } |
292 | 298 | ||