summaryrefslogtreecommitdiff
path: root/core/pim/todo/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index 33f13aa..a34bcf2 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -101,25 +101,24 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
"before you enter any data") );
setCentralWidget( table );
setToolBarsMovable( FALSE );
// qDebug("after load: t=%d", t.elapsed() );
Config config( "todo" );
config.setGroup( "View" );
bool complete = config.readBoolEntry( "ShowComplete", true );
table->setShowCompleted( complete );
- /* added 20.01.2k2 by se */
bool showdeadline = config.readBoolEntry("ShowDeadLine", true);
table->setShowDeadline (showdeadline);
QString category = config.readEntry( "Category", QString::null );
table->setShowCategory( category );
QPEToolBar *bar = new QPEToolBar( this );
bar->setHorizontalStretchable( TRUE );
QPEMenuBar *mb = new QPEMenuBar( bar );
catMenu = new QPopupMenu( this );
@@ -172,25 +171,24 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
a->addTo( edit );
if ( table->numRows() )
a->setEnabled( TRUE );
else
a->setEnabled( FALSE );
//a->setEnabled( FALSE );
findAction = a;
// qDebug("mainwindow #2: t=%d", t.elapsed() );
completedAction = new QAction( QString::null, tr("Completed tasks"), 0, this, 0, TRUE );
- /* added 20.01.2k2 by se */
showdeadlineAction = new QAction( QString::null, tr( "Show Deadline" ), 0, this, 0, TRUE );
catMenu->setCheckable( true );
populateCategories();
mb->insertItem( tr( "Task" ), edit );
mb->insertItem( tr( "View" ), catMenu );
resize( 200, 300 );
if ( table->numRows() > 0 )
currentEntryChanged( 0, 0 );
connect( table, SIGNAL( signalEdit() ),
@@ -355,25 +353,25 @@ void TodoWindow::setCategory( int c )
}
table->setPaintingEnabled( true );
}
void TodoWindow::populateCategories()
{
catMenu->clear();
completedAction->addTo( catMenu );
completedAction->setOn( table->showCompleted() );
showdeadlineAction->addTo( catMenu );
showdeadlineAction->setOn( table->showDeadline() );
-
+ catMenu->insertSeparator();
int id, rememberId;
id = 1;
catMenu->insertItem( tr( "All Categories" ), id++ );
// catMenu->insertSeparator();
QStringList categories = table->categories();
categories.append( tr( "Unfiled" ) );
for ( QStringList::Iterator it = categories.begin();
it != categories.end(); ++it ) {
catMenu->insertItem( *it, id );
if ( *it == table->showCategory() )
rememberId = id;
++id;