-rw-r--r-- | core/pim/todo/mainwindow.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index fb85a09..6709811 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -15,12 +15,14 @@ | |||
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #define QTOPIA_INTERNAL_FD | ||
22 | |||
21 | #include "mainwindow.h" | 23 | #include "mainwindow.h" |
22 | #include "todoentryimpl.h" | 24 | #include "todoentryimpl.h" |
23 | #include "todotable.h" | 25 | #include "todotable.h" |
24 | 26 | ||
25 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
26 | #include <qpe/config.h> | 28 | #include <qpe/config.h> |
@@ -119,21 +121,23 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
119 | QAction *a = new QAction( tr( "New Task" ), Resource::loadPixmap( "new" ), | 121 | QAction *a = new QAction( tr( "New Task" ), Resource::loadPixmap( "new" ), |
120 | QString::null, 0, this, 0 ); | 122 | QString::null, 0, this, 0 ); |
121 | connect( a, SIGNAL( activated() ), | 123 | connect( a, SIGNAL( activated() ), |
122 | this, SLOT( slotNew() ) ); | 124 | this, SLOT( slotNew() ) ); |
123 | a->addTo( bar ); | 125 | a->addTo( bar ); |
124 | a->addTo( edit ); | 126 | a->addTo( edit ); |
127 | |||
125 | a = new QAction( tr( "Edit" ), Resource::loadIconSet( "edit" ), | 128 | a = new QAction( tr( "Edit" ), Resource::loadIconSet( "edit" ), |
126 | QString::null, 0, this, 0 ); | 129 | QString::null, 0, this, 0 ); |
127 | connect( a, SIGNAL( activated() ), | 130 | connect( a, SIGNAL( activated() ), |
128 | this, SLOT( slotEdit() ) ); | 131 | this, SLOT( slotEdit() ) ); |
129 | a->addTo( bar ); | 132 | a->addTo( bar ); |
130 | a->addTo( edit ); | 133 | a->addTo( edit ); |
131 | a->addTo( contextMenu ); | 134 | a->addTo( contextMenu ); |
132 | a->setEnabled( FALSE ); | 135 | a->setEnabled( FALSE ); |
133 | editAction = a; | 136 | editAction = a; |
137 | |||
134 | a = new QAction( tr( "Delete" ), Resource::loadIconSet( "trash" ), | 138 | a = new QAction( tr( "Delete" ), Resource::loadIconSet( "trash" ), |
135 | QString::null, 0, this, 0 ); | 139 | QString::null, 0, this, 0 ); |
136 | connect( a, SIGNAL( activated() ), | 140 | connect( a, SIGNAL( activated() ), |
137 | this, SLOT( slotDelete() ) ); | 141 | this, SLOT( slotDelete() ) ); |
138 | a->addTo( bar ); | 142 | a->addTo( bar ); |
139 | a->addTo( edit ); | 143 | a->addTo( edit ); |
@@ -323,13 +327,13 @@ void TodoWindow::setCategory( int c ) | |||
323 | return; | 327 | return; |
324 | table->setPaintingEnabled( false ); | 328 | table->setPaintingEnabled( false ); |
325 | for ( unsigned int i = 1; i < catMenu->count(); i++ ) | 329 | for ( unsigned int i = 1; i < catMenu->count(); i++ ) |
326 | catMenu->setItemChecked( i, c == (int)i ); | 330 | catMenu->setItemChecked( i, c == (int)i ); |
327 | if ( c == 1 ) { | 331 | if ( c == 1 ) { |
328 | table->setShowCategory( QString::null ); | 332 | table->setShowCategory( QString::null ); |
329 | setCaption( tr("Todo") + " - " + tr( "All" ) ); | 333 | setCaption( tr("Todo") + " - " + tr( "All Categories" ) ); |
330 | } else if ( c == (int)catMenu->count() - 1 ) { | 334 | } else if ( c == (int)catMenu->count() - 1 ) { |
331 | table->setShowCategory( tr( "Unfiled" ) ); | 335 | table->setShowCategory( tr( "Unfiled" ) ); |
332 | setCaption( tr("Todo") + " - " + tr( "Unfiled" ) ); | 336 | setCaption( tr("Todo") + " - " + tr( "Unfiled" ) ); |
333 | } else { | 337 | } else { |
334 | QString cat = table->categories()[c - 2]; | 338 | QString cat = table->categories()[c - 2]; |
335 | table->setShowCategory( cat ); | 339 | table->setShowCategory( cat ); |
@@ -345,13 +349,13 @@ void TodoWindow::populateCategories() | |||
345 | completedAction->addTo( catMenu ); | 349 | completedAction->addTo( catMenu ); |
346 | completedAction->setOn( table->showCompleted() ); | 350 | completedAction->setOn( table->showCompleted() ); |
347 | 351 | ||
348 | int id, | 352 | int id, |
349 | rememberId; | 353 | rememberId; |
350 | id = 1; | 354 | id = 1; |
351 | catMenu->insertItem( tr( "All" ), id++ ); | 355 | catMenu->insertItem( tr( "All Categories" ), id++ ); |
352 | // catMenu->insertSeparator(); | 356 | // catMenu->insertSeparator(); |
353 | QStringList categories = table->categories(); | 357 | QStringList categories = table->categories(); |
354 | categories.append( tr( "Unfiled" ) ); | 358 | categories.append( tr( "Unfiled" ) ); |
355 | for ( QStringList::Iterator it = categories.begin(); | 359 | for ( QStringList::Iterator it = categories.begin(); |
356 | it != categories.end(); ++it ) { | 360 | it != categories.end(); ++it ) { |
357 | catMenu->insertItem( *it, id ); | 361 | catMenu->insertItem( *it, id ); |