-rw-r--r-- | korganizer/koprefs.cpp | 1 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 16 |
3 files changed, 15 insertions, 3 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 2168094..1e68a44 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -91,6 +91,7 @@ KOPrefs::KOPrefs() : addItemBool("ShowIconJournal",&mShowIconJournal,true); addItemBool("ShowIconStretch",&mShowIconStretch,true); addItemBool("ShowIconFilter",&mShowIconFilter,false); + addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); addItemInt("LastLoadedLanguage",&mOldLanguage,0); addItemBool("AskForQuit",&mAskForQuit,false); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 8dfdf69..fbce6ea 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -186,6 +186,7 @@ class KOPrefs : public KPimPrefs bool mShowIconNext; bool mShowIconJournal; bool mShowIconFilter; + bool mShowIconOnetoolbar; bool mShowIconStretch; diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index c6ae868..a4e0834 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -194,7 +194,10 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : filterMenubar = 0; filterPopupMenu = 0; } - + if ( p->mShowIconOnetoolbar ) { + viewToolBar = iconToolBar ; + navigatorToolBar = iconToolBar ; + } else { if ( p->mToolBarHorV ) { if ( p->mToolBarUpV ) tbd = Bottom; @@ -223,7 +226,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : } navigatorToolBar = new QPEToolBar( this ); addToolBar (navigatorToolBar , tbd ); - + } @@ -693,6 +696,7 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "newevent" ); configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); + configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); configureToolBarMenu->insertSeparator(); configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); configureToolBarMenu->insertSeparator(); @@ -1193,6 +1197,8 @@ void MainWindow::initActions() } if (p-> mShowIconFilter) configureToolBarMenu->setItemChecked( 7, true ); + if (p-> mShowIconOnetoolbar) + configureToolBarMenu->setItemChecked( 6, true ); if ( filterMenubar ) @@ -1954,8 +1960,11 @@ void MainWindow::selectFilter( int fil ) if ( mView->filterView()->filtersEnabled() ) mView->toggleFilerEnabled( ); } else { - if ( !mView->filterView()->filtersEnabled() ) + if ( !mView->filterView()->filtersEnabled() ) { + mView->filterView()->blockSignals( true ); mView->toggleFilerEnabled( ); + mView->filterView()->blockSignals( false ); + } mView->selectFilter( fil-2 ); } } @@ -1983,6 +1992,7 @@ void MainWindow::configureToolBar( int item ) configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); KOPrefs *p = KOPrefs::instance(); p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); + p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); |