summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index eed023c..3c0259f 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -166,49 +166,49 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
globalFlagBlockStartup = 1;
iconToolBar = new QPEToolBar( this );
addToolBar (iconToolBar , tbd );
#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;
}
else {
if ( p->mToolBarUpF )
tbd = Right;
else
tbd = Left;
}
filterToolBar = new QPEToolBar ( this );
- filterMenubar = new QMenuBar( filterToolBar );
+ filterMenubar = new QMenuBar( 0 );
QFontMetrics fm ( filterMenubar->font() );
filterPopupMenu = new QPopupMenu( this );
filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 );
QString addTest = "A";
filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) );
#ifdef DESKTOP_VERSION
addTest = "AAABBBCCCx";
#else
addTest = "AAx";
#endif
filterMenubar->setMaximumWidth( 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 ;
@@ -1259,50 +1259,52 @@ void MainWindow::initActions()
configureToolBarMenu->setItemChecked( 300, true );
if (p-> mShowIconWeekNum)
configureToolBarMenu->setItemChecked( 400, true );
if (!p-> mShowIconStretch) {
QLabel* dummy = new QLabel( iconToolBar );
dummy->setBackgroundColor( iconToolBar->backgroundColor() );
dummy->setMinimumWidth( 0 );
iconToolBar->setStretchableWidget ( dummy ) ;
}
else {
iconToolBar->setHorizontalStretchable (true );
viewToolBar->setHorizontalStretchable (true );
navigatorToolBar->setHorizontalStretchable (true );
iconToolBar->setVerticalStretchable (true );
viewToolBar->setVerticalStretchable (true );
navigatorToolBar->setVerticalStretchable (true );
configureToolBarMenu->setItemChecked( 5, true );
}
if (p-> mShowIconFilter)
configureToolBarMenu->setItemChecked( 7, true );
if (p-> mShowIconOnetoolbar)
configureToolBarMenu->setItemChecked( 6, true );
- if ( filterMenubar )
- connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) );
+ if ( filterMenubar ) {
+ filterMenubar->reparent(filterToolBar,0,QPoint(0,0) );
+ connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) );
+ }
connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
configureAgenda( p->mHourSize );
connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
}
void MainWindow::exportToPhone( int mode )
{
//ex2phone->insertItem(i18n("Complete calendar..."), 1 );
//ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
KOex2phonePrefs ex2phone;
ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
if ( mode == 1 )
ex2phone.setCaption(i18n("Export complete calendar"));
if ( mode == 2 )
ex2phone.setCaption(i18n("Export filtered calendar"));
if ( !ex2phone.exec() ) {
return;
}
KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();