From 6456ddb2be2a874e858ee25d8463e446b7af58d5 Mon Sep 17 00:00:00 2001 From: leseb Date: Wed, 10 Jul 2002 17:45:15 +0000 Subject: Fix "view" menu item --- 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 @@ -158,6 +158,7 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f ) : a->addTo( contextMenu ); connect( a, SIGNAL( activated() ), this, SLOT(slotShowDetails() ) ); + viewAction = a; edit->insertSeparator(); @@ -436,11 +437,13 @@ void TodoWindow::currentEntryChanged( int r, int ) { if ( r != -1 && table->rowHeight( r ) > 0 ) { editAction->setEnabled( TRUE ); + viewAction->setEnabled( TRUE ); deleteAction->setEnabled( TRUE ); duplicateAction->setEnabled( TRUE ); deleteAllAction->setEnabled( TRUE ); } else { editAction->setEnabled( FALSE ); + viewAction->setEnabled( FALSE ); deleteAction->setEnabled( FALSE ); duplicateAction->setEnabled( FALSE ); deleteAllAction->setEnabled( FALSE ); @@ -607,9 +610,12 @@ void TodoWindow::beamDone( Ir *ir ) void TodoWindow::showDeadline( bool s ) { + if ( !table->isUpdatesEnabled() ) + return; table->setPaintingEnabled( false ); table->setShowDeadline( s ); table->setPaintingEnabled( true ); + mStack->raiseWidget( 1 ); } void TodoWindow::slotShowDetails() { 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 @@ -79,6 +79,7 @@ private: TodoTable *table; TodoLabel *mView; QAction *editAction, + *viewAction, *deleteAction, *findAction, *completedAction, -- cgit v0.9.0.2