summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index ae03a09..09a0880 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -163,13 +163,19 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
if ( KOPrefs::instance()->mUseAppColors )
QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
globalFlagBlockStartup = 1;
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;
else
tbd = Top;
}
@@ -190,21 +196,26 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
addTest = "AAAx";
#endif
filterMenubar->setFixedWidth( fm.width( i18n("No Filter")+addTest ) );
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;
filterPopupMenu = 0;
}
if ( p->mShowIconOnetoolbar ) {
viewToolBar = iconToolBar ;
navigatorToolBar = iconToolBar ;
} else {
+#ifndef DESKTOP_VERSION
+ setToolBarsMovable( false );
+#endif
if ( p->mToolBarHorV ) {
if ( p->mToolBarUpV )
tbd = Bottom;
else
tbd = Top;
}
@@ -2407,6 +2418,19 @@ void MainWindow::hideEvent ( QHideEvent * )
QString sum = mCalendar->nextSummary();
message = i18n("%1 %2 - %3 (next event/todo with alarm)").arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDate(nextA.date() , false));
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);
+}