-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 | |||
@@ -570,9 +570,10 @@ void MainWindow::initActions() | |||
570 | mWeekPixmap.resize( pixWid , pixHei ); | 570 | mWeekPixmap.resize( pixWid , pixHei ); |
571 | mWeekPixmap.fill( mWeekBgColor ); | 571 | mWeekPixmap.fill( mWeekBgColor ); |
572 | icon = mWeekPixmap; | 572 | icon = mWeekPixmap; |
573 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); | 573 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); |
574 | mWeekAction->addTo( iconToolBar ); | 574 | if ( p-> mShowIconWeekNum ) |
575 | mWeekAction->addTo( iconToolBar ); | ||
575 | mWeekFont = font(); | 576 | mWeekFont = font(); |
576 | 577 | ||
577 | int fontPoint = mWeekFont.pointSize(); | 578 | int fontPoint = mWeekFont.pointSize(); |
578 | QFontMetrics f( mWeekFont ); | 579 | QFontMetrics f( mWeekFont ); |
@@ -622,8 +623,9 @@ void MainWindow::initActions() | |||
622 | 623 | ||
623 | icon = loadPixmap( pathString + "newevent" ); | 624 | icon = loadPixmap( pathString + "newevent" ); |
624 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 625 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
625 | configureToolBarMenu->insertSeparator(); | 626 | configureToolBarMenu->insertSeparator(); |
627 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); | ||
626 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); | 628 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); |
627 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 629 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); |
628 | ne_action->addTo( actionMenu ); | 630 | ne_action->addTo( actionMenu ); |
629 | connect( ne_action, SIGNAL( activated() ), | 631 | connect( ne_action, SIGNAL( activated() ), |
@@ -705,23 +707,23 @@ void MainWindow::initActions() | |||
705 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 707 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); |
706 | day7_action->addTo( viewMenu ); | 708 | day7_action->addTo( viewMenu ); |
707 | connect( day7_action, SIGNAL( activated() ), | 709 | connect( day7_action, SIGNAL( activated() ), |
708 | mView->viewManager(), SLOT( showWeekView() ) ); | 710 | mView->viewManager(), SLOT( showWeekView() ) ); |
711 | |||
712 | icon = loadPixmap( pathString + "workweek2" ); | ||
713 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); | ||
714 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); | ||
715 | day6_action->addTo( viewMenu ); | ||
716 | connect( day6_action, SIGNAL( activated() ), | ||
717 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); | ||
709 | 718 | ||
710 | icon = loadPixmap( pathString + "month" ); | 719 | icon = loadPixmap( pathString + "month" ); |
711 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 720 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
712 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 721 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); |
713 | month_action->addTo( viewMenu ); | 722 | month_action->addTo( viewMenu ); |
714 | connect( month_action, SIGNAL( activated() ), | 723 | connect( month_action, SIGNAL( activated() ), |
715 | mView->viewManager(), SLOT( showMonthView() ) ); | 724 | mView->viewManager(), SLOT( showMonthView() ) ); |
716 | 725 | ||
717 | icon = loadPixmap( pathString + "workweek2" ); | ||
718 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); | ||
719 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); | ||
720 | day6_action->addTo( viewMenu ); | ||
721 | connect( day6_action, SIGNAL( activated() ), | ||
722 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); | ||
723 | |||
724 | icon = loadPixmap( pathString + "todo" ); | 726 | icon = loadPixmap( pathString + "todo" ); |
725 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 727 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
726 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); | 728 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); |
727 | todoview_action->addTo( viewMenu ); | 729 | todoview_action->addTo( viewMenu ); |
@@ -1000,12 +1002,12 @@ void MainWindow::initActions() | |||
1000 | if (p-> mShowIconDay5) | 1002 | if (p-> mShowIconDay5) |
1001 | day5_action->addTo( iconToolBar ); | 1003 | day5_action->addTo( iconToolBar ); |
1002 | if (p-> mShowIconDay7) | 1004 | if (p-> mShowIconDay7) |
1003 | day7_action->addTo( iconToolBar ); | 1005 | day7_action->addTo( iconToolBar ); |
1004 | if (p-> mShowIconMonth) | ||
1005 | month_action->addTo( iconToolBar ); | ||
1006 | if (p-> mShowIconDay6) | 1006 | if (p-> mShowIconDay6) |
1007 | day6_action->addTo( iconToolBar ); | 1007 | day6_action->addTo( iconToolBar ); |
1008 | if (p-> mShowIconMonth) | ||
1009 | month_action->addTo( iconToolBar ); | ||
1008 | if (p-> mShowIconTodoview) | 1010 | if (p-> mShowIconTodoview) |
1009 | todoview_action->addTo( iconToolBar ); | 1011 | todoview_action->addTo( iconToolBar ); |
1010 | if (p-> mShowIconJournal) | 1012 | if (p-> mShowIconJournal) |
1011 | viewjournal_action->addTo( iconToolBar ); | 1013 | viewjournal_action->addTo( iconToolBar ); |
@@ -1086,9 +1088,10 @@ void MainWindow::initActions() | |||
1086 | if (p-> mShowIconJournal) | 1088 | if (p-> mShowIconJournal) |
1087 | configureToolBarMenu->setItemChecked( 90, true ); | 1089 | configureToolBarMenu->setItemChecked( 90, true ); |
1088 | if (p-> mShowIconWhatsThis) | 1090 | if (p-> mShowIconWhatsThis) |
1089 | configureToolBarMenu->setItemChecked( 300, true ); | 1091 | configureToolBarMenu->setItemChecked( 300, true ); |
1090 | 1092 | if (p-> mShowIconWeekNum) | |
1093 | configureToolBarMenu->setItemChecked( 400, true ); | ||
1091 | QLabel* dummy = new QLabel( iconToolBar ); | 1094 | QLabel* dummy = new QLabel( iconToolBar ); |
1092 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); | 1095 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); |
1093 | if (!p-> mShowIconStretch) | 1096 | if (!p-> mShowIconStretch) |
1094 | iconToolBar->setStretchableWidget ( dummy ) ; | 1097 | iconToolBar->setStretchableWidget ( dummy ) ; |
@@ -1827,8 +1830,9 @@ void MainWindow::configureToolBar( int item ) | |||
1827 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); | 1830 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); |
1828 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); | 1831 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); |
1829 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); | 1832 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); |
1830 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); | 1833 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); |
1834 | p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); | ||
1831 | // initActions(); | 1835 | // initActions(); |
1832 | } | 1836 | } |
1833 | 1837 | ||
1834 | void MainWindow::setCaptionToDates() | 1838 | void MainWindow::setCaptionToDates() |