summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Unidiff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index a4e0834..ad1c0cd 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -172,33 +172,37 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
172 tbd = Bottom; 172 tbd = Bottom;
173 else 173 else
174 tbd = Top; 174 tbd = Top;
175 } 175 }
176 else { 176 else {
177 if ( p->mToolBarUpF ) 177 if ( p->mToolBarUpF )
178 tbd = Right; 178 tbd = Right;
179 else 179 else
180 tbd = Left; 180 tbd = Left;
181 } 181 }
182 filterToolBar = new QPEToolBar ( this ); 182 filterToolBar = new QPEToolBar ( this );
183 filterMenubar = new QPEMenuBar( filterToolBar ); 183 filterMenubar = new QPEMenuBar( filterToolBar );
184 QFontMetrics fm ( filterMenubar->font() ); 184 QFontMetrics fm ( filterMenubar->font() );
185 185
186 filterPopupMenu = new QPopupMenu( this ); 186 filterPopupMenu = new QPopupMenu( this );
187 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); 187 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 );
188 filterMenubar->setFixedWidth( fm.width( i18n("No Filter")+"Ax" ) ); 188 QString addTest = "Ax";
189#ifdef DESKTOP_VERSION
190 addTest = "AAAx";
191#endif
192 filterMenubar->setFixedWidth( fm.width( i18n("No Filter")+addTest ) );
189 addToolBar (filterToolBar , tbd ); 193 addToolBar (filterToolBar , tbd );
190 connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); 194 connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) );
191 connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); 195 connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) );
192 } else { 196 } else {
193 filterToolBar = 0; 197 filterToolBar = 0;
194 filterMenubar = 0; 198 filterMenubar = 0;
195 filterPopupMenu = 0; 199 filterPopupMenu = 0;
196 } 200 }
197 if ( p->mShowIconOnetoolbar ) { 201 if ( p->mShowIconOnetoolbar ) {
198 viewToolBar = iconToolBar ; 202 viewToolBar = iconToolBar ;
199 navigatorToolBar = iconToolBar ; 203 navigatorToolBar = iconToolBar ;
200 } else { 204 } else {
201 if ( p->mToolBarHorV ) { 205 if ( p->mToolBarHorV ) {
202 if ( p->mToolBarUpV ) 206 if ( p->mToolBarUpV )
203 tbd = Bottom; 207 tbd = Bottom;
204 else 208 else
@@ -335,32 +339,33 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
335 339
336 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); 340 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
337 if ( showWarning ) { 341 if ( showWarning ) {
338 KMessageBox::information( this, 342 KMessageBox::information( this,
339 "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); 343 "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information");
340 qApp->processEvents(); 344 qApp->processEvents();
341 mView->dialogManager()->showSyncOptions(); 345 mView->dialogManager()->showSyncOptions();
342 } 346 }
343 347
344 //US listen for result adressed from Ka/Pi 348 //US listen for result adressed from Ka/Pi
345#ifndef DESKTOP_VERSION 349#ifndef DESKTOP_VERSION
346 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 350 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
347#endif 351#endif
348#ifndef DESKTOP_VERSION 352#ifndef DESKTOP_VERSION
349 infrared = 0; 353 infrared = 0;
350#endif 354#endif
355 updateFilterToolbar();
351 updateWeek( mView->startDate() ); 356 updateWeek( mView->startDate() );
352 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), 357 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
353 SLOT( updateWeekNum( const KCal::DateList & ) ) ); 358 SLOT( updateWeekNum( const KCal::DateList & ) ) );
354 mBRdisabled = false; 359 mBRdisabled = false;
355 //toggleBeamReceive(); 360 //toggleBeamReceive();
356} 361}
357MainWindow::~MainWindow() 362MainWindow::~MainWindow()
358{ 363{
359 //qDebug("MainWindow::~MainWindow() "); 364 //qDebug("MainWindow::~MainWindow() ");
360 //save toolbar location 365 //save toolbar location
361 delete mCalendar; 366 delete mCalendar;
362 delete mSyncManager; 367 delete mSyncManager;
363#ifndef DESKTOP_VERSION 368#ifndef DESKTOP_VERSION
364 if ( infrared ) 369 if ( infrared )
365 delete infrared; 370 delete infrared;
366#endif 371#endif
@@ -979,33 +984,40 @@ void MainWindow::initActions()
979#else 984#else
980 //importMenu->insertSeparator(); 985 //importMenu->insertSeparator();
981 icon = loadPixmap( pathString + "print" ); 986 icon = loadPixmap( pathString + "print" );
982 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); 987 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
983 action->addTo( beamMenu_X ); 988 action->addTo( beamMenu_X );
984 connect( action, SIGNAL( activated() ), 989 connect( action, SIGNAL( activated() ),
985 this, SLOT( printCal() ) ); 990 this, SLOT( printCal() ) );
986 991
987 icon = loadPixmap( pathString + "print" ); 992 icon = loadPixmap( pathString + "print" );
988 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 993 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
989 action->addTo( beamMenu_X ); 994 action->addTo( beamMenu_X );
990 connect( action, SIGNAL( activated() ), 995 connect( action, SIGNAL( activated() ),
991 this, SLOT( printSel() ) ); 996 this, SLOT( printSel() ) );
992 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); 997 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
993 action->addTo( beamMenu_X ); 998 action->addTo( beamMenu_X );
994 connect( action, SIGNAL( activated() ), 999 connect( action, SIGNAL( activated() ),
995 mView->viewManager(), SIGNAL( printWNV() ) ); 1000 mView->viewManager(), SLOT( slotprintWNV() ) );
1001
1002 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this );
1003 action->addTo( beamMenu_X );
1004 connect( action, SIGNAL( activated() ),
1005 mView, SLOT( slotprintSelInc() ) );
1006
1007
996 importMenu->insertItem( i18n("Print"), beamMenu_X ); 1008 importMenu->insertItem( i18n("Print"), beamMenu_X );
997#endif 1009#endif
998 importMenu->insertSeparator(); 1010 importMenu->insertSeparator();
999 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 1011 action = new QAction( "manage cat", i18n("Manage new categories..."), 0,
1000 this ); 1012 this );
1001 action->addTo( importMenu ); 1013 action->addTo( importMenu );
1002 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 1014 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
1003 importMenu->insertSeparator(); 1015 importMenu->insertSeparator();
1004 action = new QAction( "beam all", i18n("Save"), 0, 1016 action = new QAction( "beam all", i18n("Save"), 0,
1005 this ); 1017 this );
1006 action->addTo( importMenu ); 1018 action->addTo( importMenu );
1007 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 1019 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
1008 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 1020 action = new QAction( "beam all", i18n("Exit (+save)"), 0,
1009 this ); 1021 this );
1010 action->addTo( importMenu ); 1022 action->addTo( importMenu );
1011 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 1023 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );