summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp6
-rw-r--r--core/pim/todo/mainwindow.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index d419166..27e76d9 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -155,12 +155,13 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f ) :
155 155
156 a = new QAction( QString::null, tr("View Task"), 0, this, 0 ); 156 a = new QAction( QString::null, tr("View Task"), 0, this, 0 );
157 a->addTo( edit ); 157 a->addTo( edit );
158 a->addTo( contextMenu ); 158 a->addTo( contextMenu );
159 connect( a, SIGNAL( activated() ), 159 connect( a, SIGNAL( activated() ),
160 this, SLOT(slotShowDetails() ) ); 160 this, SLOT(slotShowDetails() ) );
161 viewAction = a;
161 162
162 edit->insertSeparator(); 163 edit->insertSeparator();
163 164
164 a = new QAction( tr( "Delete..." ), Resource::loadIconSet( "trash" ), 165 a = new QAction( tr( "Delete..." ), Resource::loadIconSet( "trash" ),
165 QString::null, 0, this, 0 ); 166 QString::null, 0, this, 0 );
166 connect( a, SIGNAL( activated() ), 167 connect( a, SIGNAL( activated() ),
@@ -433,17 +434,19 @@ void TodoWindow::showCompleted( bool s )
433} 434}
434 435
435void TodoWindow::currentEntryChanged( int r, int ) 436void TodoWindow::currentEntryChanged( int r, int )
436{ 437{
437 if ( r != -1 && table->rowHeight( r ) > 0 ) { 438 if ( r != -1 && table->rowHeight( r ) > 0 ) {
438 editAction->setEnabled( TRUE ); 439 editAction->setEnabled( TRUE );
440 viewAction->setEnabled( TRUE );
439 deleteAction->setEnabled( TRUE ); 441 deleteAction->setEnabled( TRUE );
440 duplicateAction->setEnabled( TRUE ); 442 duplicateAction->setEnabled( TRUE );
441 deleteAllAction->setEnabled( TRUE ); 443 deleteAllAction->setEnabled( TRUE );
442 } else { 444 } else {
443 editAction->setEnabled( FALSE ); 445 editAction->setEnabled( FALSE );
446 viewAction->setEnabled( FALSE );
444 deleteAction->setEnabled( FALSE ); 447 deleteAction->setEnabled( FALSE );
445 duplicateAction->setEnabled( FALSE ); 448 duplicateAction->setEnabled( FALSE );
446 deleteAllAction->setEnabled( FALSE ); 449 deleteAllAction->setEnabled( FALSE );
447 } 450 }
448} 451}
449 452
@@ -604,15 +607,18 @@ void TodoWindow::beamDone( Ir *ir )
604 delete ir; 607 delete ir;
605 unlink( beamfile ); 608 unlink( beamfile );
606} 609}
607 610
608void TodoWindow::showDeadline( bool s ) 611void TodoWindow::showDeadline( bool s )
609{ 612{
613 if ( !table->isUpdatesEnabled() )
614 return;
610 table->setPaintingEnabled( false ); 615 table->setPaintingEnabled( false );
611 table->setShowDeadline( s ); 616 table->setShowDeadline( s );
612 table->setPaintingEnabled( true ); 617 table->setPaintingEnabled( true );
618 mStack->raiseWidget( 1 );
613} 619}
614void TodoWindow::slotShowDetails() 620void TodoWindow::slotShowDetails()
615{ 621{
616 ToDoEvent event = table->currentEntry(); 622 ToDoEvent event = table->currentEntry();
617 slotShowDetails( event ); 623 slotShowDetails( event );
618} 624}
diff --git a/core/pim/todo/mainwindow.h b/core/pim/todo/mainwindow.h
index f62ec6e..7e8445c 100644
--- a/core/pim/todo/mainwindow.h
+++ b/core/pim/todo/mainwindow.h
@@ -76,12 +76,13 @@ private:
76 //inline void switchToTable(); // move back to the normal view 76 //inline void switchToTable(); // move back to the normal view
77 77
78private: 78private:
79 TodoTable *table; 79 TodoTable *table;
80 TodoLabel *mView; 80 TodoLabel *mView;
81 QAction *editAction, 81 QAction *editAction,
82 *viewAction,
82 *deleteAction, 83 *deleteAction,
83 *findAction, 84 *findAction,
84 *completedAction, 85 *completedAction,
85 *showdeadlineAction, 86 *showdeadlineAction,
86 *deleteAllAction, 87 *deleteAllAction,
87 *duplicateAction; 88 *duplicateAction;