author | zautrix <zautrix> | 2005-02-22 01:14:35 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-22 01:14:35 (UTC) |
commit | df40d77f7407326221ba2848163c4f61b7bb1d2f (patch) (side-by-side diff) | |
tree | 1b46bf666f7371189ba421080f4dcd66dc9037f2 /korganizer/mainwindow.cpp | |
parent | ce261d6197d319d67f7b275813449f36ce42a730 (diff) | |
download | kdepimpi-df40d77f7407326221ba2848163c4f61b7bb1d2f.zip kdepimpi-df40d77f7407326221ba2848163c4f61b7bb1d2f.tar.gz kdepimpi-df40d77f7407326221ba2848163c4f61b7bb1d2f.tar.bz2 |
next
-rw-r--r-- | korganizer/mainwindow.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index a164fa4..4f2cccf 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -568,13 +568,14 @@ void MainWindow::initActions() } mWeekBgColor = iconToolBar->backgroundColor(); mWeekPixmap.resize( pixWid , pixHei ); mWeekPixmap.fill( mWeekBgColor ); icon = mWeekPixmap; mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); - mWeekAction->addTo( iconToolBar ); + if ( p-> mShowIconWeekNum ) + mWeekAction->addTo( iconToolBar ); mWeekFont = font(); int fontPoint = mWeekFont.pointSize(); QFontMetrics f( mWeekFont ); int fontWid = f.width( "30" ); while ( fontWid > pixWid ) { @@ -620,12 +621,13 @@ void MainWindow::initActions() mView, SLOT( undo_delete() ) ); actionMenu->insertSeparator(); icon = loadPixmap( pathString + "newevent" ); configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); configureToolBarMenu->insertSeparator(); + configureToolBarMenu->insertItem(i18n("Week Number"), 400); configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); ne_action->addTo( actionMenu ); connect( ne_action, SIGNAL( activated() ), mView, SLOT( newEvent() ) ); icon = loadPixmap( pathString + "newtodo" ); @@ -703,27 +705,27 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "week" ); configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); day7_action->addTo( viewMenu ); connect( day7_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showWeekView() ) ); + + icon = loadPixmap( pathString + "workweek2" ); + configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); + QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); + day6_action->addTo( viewMenu ); + connect( day6_action, SIGNAL( activated() ), + mView->viewManager(), SLOT( showMonthViewWeek() ) ); icon = loadPixmap( pathString + "month" ); configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); month_action->addTo( viewMenu ); connect( month_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showMonthView() ) ); - icon = loadPixmap( pathString + "workweek2" ); - configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); - QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); - day6_action->addTo( viewMenu ); - connect( day6_action, SIGNAL( activated() ), - mView->viewManager(), SLOT( showMonthViewWeek() ) ); - icon = loadPixmap( pathString + "todo" ); configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); todoview_action->addTo( viewMenu ); connect( todoview_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showTodoView() ) ); @@ -998,16 +1000,16 @@ void MainWindow::initActions() if (p-> mShowIconDay1) day1_action->addTo( iconToolBar ); if (p-> mShowIconDay5) day5_action->addTo( iconToolBar ); if (p-> mShowIconDay7) day7_action->addTo( iconToolBar ); - if (p-> mShowIconMonth) - month_action->addTo( iconToolBar ); if (p-> mShowIconDay6) day6_action->addTo( iconToolBar ); + if (p-> mShowIconMonth) + month_action->addTo( iconToolBar ); if (p-> mShowIconTodoview) todoview_action->addTo( iconToolBar ); if (p-> mShowIconJournal) viewjournal_action->addTo( iconToolBar ); icon = loadPixmap( pathString + "2leftarrowB" ); configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); @@ -1084,13 +1086,14 @@ void MainWindow::initActions() if (p-> mShowIconNext) configureToolBarMenu->setItemChecked( 110, true ); if (p-> mShowIconJournal) configureToolBarMenu->setItemChecked( 90, true ); if (p-> mShowIconWhatsThis) configureToolBarMenu->setItemChecked( 300, true ); - + if (p-> mShowIconWeekNum) + configureToolBarMenu->setItemChecked( 400, true ); QLabel* dummy = new QLabel( iconToolBar ); dummy->setBackgroundColor( iconToolBar->backgroundColor() ); if (!p-> mShowIconStretch) iconToolBar->setStretchableWidget ( dummy ) ; else configureToolBarMenu->setItemChecked( 5, true ); @@ -1825,12 +1828,13 @@ void MainWindow::configureToolBar( int item ) p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); + p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); // initActions(); } void MainWindow::setCaptionToDates() { QString selDates; |