-rw-r--r-- | core/pim/todo/mainwindow.cpp | 3 | ||||
-rw-r--r-- | core/pim/todo/todotable.cpp | 17 |
2 files changed, 13 insertions, 7 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index 5609211..b7b1da0 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -254,12 +254,15 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f ) : | |||
254 | // qDebug("mainwindow #3: t=%d", t.elapsed() ); | 254 | // qDebug("mainwindow #3: t=%d", t.elapsed() ); |
255 | table->updateVisible(); | 255 | table->updateVisible(); |
256 | table->setUpdatesEnabled( TRUE ); | 256 | table->setUpdatesEnabled( TRUE ); |
257 | table->setPaintingEnabled( TRUE ); | 257 | table->setPaintingEnabled( TRUE ); |
258 | table->viewport()->setUpdatesEnabled( TRUE ); | 258 | table->viewport()->setUpdatesEnabled( TRUE ); |
259 | 259 | ||
260 | // Initialize the table | ||
261 | table->updateVisible(); | ||
262 | |||
260 | connect( completedAction, SIGNAL( toggled(bool) ), this, SLOT( showCompleted(bool) ) ); | 263 | connect( completedAction, SIGNAL( toggled(bool) ), this, SLOT( showCompleted(bool) ) ); |
261 | connect( showdeadlineAction, SIGNAL( toggled(bool) ), this, SLOT( showDeadline(bool) ) ); | 264 | connect( showdeadlineAction, SIGNAL( toggled(bool) ), this, SLOT( showDeadline(bool) ) ); |
262 | connect( catMenu, SIGNAL(activated(int)), this, SLOT(setCategory(int)) ); | 265 | connect( catMenu, SIGNAL(activated(int)), this, SLOT(setCategory(int)) ); |
263 | connect( table, SIGNAL( currentChanged( int, int ) ), | 266 | connect( table, SIGNAL( currentChanged( int, int ) ), |
264 | this, SLOT( currentEntryChanged( int, int ) ) ); | 267 | this, SLOT( currentEntryChanged( int, int ) ) ); |
265 | 268 | ||
diff --git a/core/pim/todo/todotable.cpp b/core/pim/todo/todotable.cpp index 877308a..52a3087 100644 --- a/core/pim/todo/todotable.cpp +++ b/core/pim/todo/todotable.cpp | |||
@@ -303,26 +303,23 @@ void TodoTable::slotClicked( int row, int col, int, const QPoint &pos ) | |||
303 | } | 303 | } |
304 | } | 304 | } |
305 | break; | 305 | break; |
306 | case 1: | 306 | case 1: |
307 | break; | 307 | break; |
308 | case 2: | 308 | case 2: |
309 | // may as well edit it... | ||
310 | // menuTimer->stop(); | ||
311 | // emit signalEdit(); | ||
312 | // Show detailed view of the selected entry | 309 | // Show detailed view of the selected entry |
313 | { | 310 | { |
314 | menuTimer->stop(); | 311 | menuTimer->stop(); |
315 | ToDoEvent *todo = todoList[static_cast<CheckItem*>(item(row, 0))]; | 312 | ToDoEvent *todo = todoList[static_cast<CheckItem*>(item(row, 0))]; |
316 | emit showDetails( *todo ); | 313 | emit showDetails( *todo ); |
317 | } | 314 | } |
318 | break; | 315 | break; |
319 | case 3: | 316 | case 3: |
320 | // may as well edit it... | 317 | // may as well edit it... |
321 | menuTimer->stop(); | 318 | menuTimer->stop(); |
322 | // emit signalEdit(); | 319 | emit signalEdit(); |
323 | break; | 320 | break; |
324 | } | 321 | } |
325 | } | 322 | } |
326 | 323 | ||
327 | void TodoTable::slotPressed( int row, int col, int, const QPoint &pos ) | 324 | void TodoTable::slotPressed( int row, int col, int, const QPoint &pos ) |
328 | { | 325 | { |
@@ -667,21 +664,27 @@ void TodoTable::keyPressEvent( QKeyEvent *e ) | |||
667 | if ( i ) | 664 | if ( i ) |
668 | i->toggle(); | 665 | i->toggle(); |
669 | break; | 666 | break; |
670 | } | 667 | } |
671 | case 1: | 668 | case 1: |
672 | break; | 669 | break; |
673 | case 2: | 670 | case 2:{ |
671 | ToDoEvent *todo = todoList[static_cast<CheckItem*>(item(currentRow(), 0))]; | ||
672 | emit showDetails(*todo); | ||
673 | break; | ||
674 | } | ||
675 | case 3: | ||
676 | // Future: Let us change the dueDate directly... | ||
674 | emit signalEdit(); | 677 | emit signalEdit(); |
675 | default: | 678 | default: |
676 | break; | 679 | break; |
677 | } | 680 | } |
678 | } else { | 681 | } else |
679 | QTable::keyPressEvent( e ); | 682 | QTable::keyPressEvent( e ); |
680 | } | 683 | } |
681 | } | 684 | |
682 | 685 | ||
683 | QStringList TodoTable::categories() | 686 | QStringList TodoTable::categories() |
684 | { | 687 | { |
685 | // This is called seldom, so calling a load in here | 688 | // This is called seldom, so calling a load in here |
686 | // should be fine. | 689 | // should be fine. |
687 | mCat.load( categoryFileName() ); | 690 | mCat.load( categoryFileName() ); |