From 529c0fb8a8bf15e7bd375ddeb355c5802baf4c93 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 30 Mar 2005 23:17:42 +0000 Subject: key fix --- (limited to 'korganizer/mainwindow.cpp') diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index ae03a09..09a0880 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -166,7 +166,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : iconToolBar = new QPEToolBar( this ); addToolBar (iconToolBar , tbd ); - if ( KOPrefs::instance()->mShowIconFilter ) { +#ifdef DESKTOP_VERSION + if ( KOPrefs::instance()->mShowIconFilter ) +#else + if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) +#endif + +{ if ( p->mToolBarHorF ) { if ( p->mToolBarUpF ) tbd = Bottom; @@ -193,6 +199,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : addToolBar (filterToolBar , tbd ); connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); + if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) + filterToolBar->hide(); } else { filterToolBar = 0; filterMenubar = 0; @@ -202,6 +210,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : viewToolBar = iconToolBar ; navigatorToolBar = iconToolBar ; } else { +#ifndef DESKTOP_VERSION + setToolBarsMovable( false ); +#endif if ( p->mToolBarHorV ) { if ( p->mToolBarUpV ) tbd = Bottom; @@ -2410,3 +2421,16 @@ void MainWindow::hideEvent ( QHideEvent * ) setCaption( message ); } } + +void MainWindow::resizeEvent( QResizeEvent* e) +{ +#ifndef DESKTOP_VERSION + if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar ) { + if (QApplication::desktop()->width() > QApplication::desktop()->height() ) + filterToolBar->hide(); + else + filterToolBar->show(); + } +#endif + QMainWindow::resizeEvent( e); +} -- cgit v0.9.0.2