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, 2 insertions, 1 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index a28fc3e..294f37c 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -351,58 +351,59 @@ void TodoWindow::slotDeleteAll() | |||
351 | return; | 351 | return; |
352 | 352 | ||
353 | 353 | ||
354 | 354 | ||
355 | table->setPaintingEnabled( false ); | 355 | table->setPaintingEnabled( false ); |
356 | table->removeAllEntries(); | 356 | table->removeAllEntries(); |
357 | table->setPaintingEnabled( true ); | 357 | table->setPaintingEnabled( true ); |
358 | 358 | ||
359 | if ( table->numRows() == 0 ) { | 359 | if ( table->numRows() == 0 ) { |
360 | currentEntryChanged( -1, 0 ); | 360 | currentEntryChanged( -1, 0 ); |
361 | findAction->setEnabled( FALSE ); | 361 | findAction->setEnabled( FALSE ); |
362 | } | 362 | } |
363 | mStack->raiseWidget(1 ); | 363 | mStack->raiseWidget(1 ); |
364 | } | 364 | } |
365 | 365 | ||
366 | void TodoWindow::slotEdit() | 366 | void TodoWindow::slotEdit() |
367 | { | 367 | { |
368 | if(syncing) { | 368 | if(syncing) { |
369 | QMessageBox::warning(this, tr("Todo"), | 369 | QMessageBox::warning(this, tr("Todo"), |
370 | tr("Can not edit data, currently syncing")); | 370 | tr("Can not edit data, currently syncing")); |
371 | return; | 371 | return; |
372 | } | 372 | } |
373 | 373 | ||
374 | ToDoEvent todo = table->currentEntry(); | 374 | ToDoEvent todo = table->currentEntry(); |
375 | 375 | qWarning("slotEdit" ); | |
376 | NewTaskDialog e( todo, this, 0, TRUE ); | 376 | NewTaskDialog e( todo, this, 0, TRUE ); |
377 | e.setCaption( tr( "Edit Task" ) ); | 377 | e.setCaption( tr( "Edit Task" ) ); |
378 | 378 | ||
379 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) | 379 | #if defined(Q_WS_QWS) || defined(_WS_QWS_) |
380 | e.showMaximized(); | 380 | e.showMaximized(); |
381 | #endif | 381 | #endif |
382 | int ret = e.exec(); | 382 | int ret = e.exec(); |
383 | 383 | ||
384 | if ( ret == QDialog::Accepted ) { | 384 | if ( ret == QDialog::Accepted ) { |
385 | qWarning("Replacing now" ); | ||
385 | table->setPaintingEnabled( false ); | 386 | table->setPaintingEnabled( false ); |
386 | todo = e.todoEntry(); | 387 | todo = e.todoEntry(); |
387 | table->replaceCurrentEntry( todo ); | 388 | table->replaceCurrentEntry( todo ); |
388 | table->setPaintingEnabled( true ); | 389 | table->setPaintingEnabled( true ); |
389 | } | 390 | } |
390 | populateCategories(); | 391 | populateCategories(); |
391 | mStack->raiseWidget( 1 ); | 392 | mStack->raiseWidget( 1 ); |
392 | } | 393 | } |
393 | void TodoWindow::slotDuplicate() | 394 | void TodoWindow::slotDuplicate() |
394 | { | 395 | { |
395 | if(syncing) { | 396 | if(syncing) { |
396 | QMessageBox::warning(this, tr("Todo"), | 397 | QMessageBox::warning(this, tr("Todo"), |
397 | tr("Can not edit data, currently syncing")); | 398 | tr("Can not edit data, currently syncing")); |
398 | return; | 399 | return; |
399 | } | 400 | } |
400 | ToDoEvent ev = table->currentEntry(); | 401 | ToDoEvent ev = table->currentEntry(); |
401 | ToDoEvent ev2 = ToDoEvent( ev ); // what about the uid | 402 | ToDoEvent ev2 = ToDoEvent( ev ); // what about the uid |
402 | int uid; | 403 | int uid; |
403 | { // uid | 404 | { // uid |
404 | Qtopia::UidGen *uidgen = new Qtopia::UidGen(); | 405 | Qtopia::UidGen *uidgen = new Qtopia::UidGen(); |
405 | uid = uidgen->generate(); | 406 | uid = uidgen->generate(); |
406 | delete uidgen; | 407 | delete uidgen; |
407 | } | 408 | } |
408 | ev2.setUid( uid ); | 409 | ev2.setUid( uid ); |