summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
authorzautrix <zautrix>2005-07-10 12:06:17 (UTC)
committer zautrix <zautrix>2005-07-10 12:06:17 (UTC)
commita49b694c286167745886996d990f524f9141adbd (patch) (unidiff)
treefe446c465bfbba1d068024449b18642de53dc0f1 /korganizer/mainwindow.cpp
parent58b7818a74809dc9280a3249eeb7e0195a66f93d (diff)
downloadkdepimpi-a49b694c286167745886996d990f524f9141adbd.zip
kdepimpi-a49b694c286167745886996d990f524f9141adbd.tar.gz
kdepimpi-a49b694c286167745886996d990f524f9141adbd.tar.bz2
fixx
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp27
1 files changed, 24 insertions, 3 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 21d5a35..279955f 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -420,13 +420,30 @@ MainWindow::~MainWindow()
420 if ( infrared ) 420 if ( infrared )
421 delete infrared; 421 delete infrared;
422#endif 422#endif
423 423
424 424
425} 425}
426 426void MainWindow::slotResetFocus()
427{
428 //qDebug(" CalendarView::slotResetFocus() %x %x %x %x", qApp->focusWidget(), menuBar1, mView,iconToolBar);
429 mFocusLoop = 3;
430 QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() ));
431}
432void MainWindow::slotResetFocusLoop()
433{
434 --mFocusLoop;
435 QWidget* fw = mView->viewManager()->currentView();
436 if ( fw ) {
437 //qDebug("loop ");
438 fw->setFocus();
439 if ( qApp->focusWidget() != fw && mFocusLoop > 0 )
440 QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() ));
441 }
442
443}
427void MainWindow::disableBR(bool b) 444void MainWindow::disableBR(bool b)
428{ 445{
429#ifndef DESKTOP_VERSION 446#ifndef DESKTOP_VERSION
430 if ( b ) { 447 if ( b ) {
431 if ( infrared ) { 448 if ( infrared ) {
432 toggleBeamReceive(); 449 toggleBeamReceive();
@@ -677,15 +694,17 @@ void MainWindow::initActions()
677 pixWid = 18; pixHei = 16; 694 pixWid = 18; pixHei = 16;
678 } 695 }
679 } else { 696 } else {
680 pathString += "iconsmini/"; 697 pathString += "iconsmini/";
681 pixWid = 18; pixHei = 16; 698 pixWid = 18; pixHei = 16;
682 } 699 }
683 KMenuBar *menuBar1; 700
684 if ( KOPrefs::instance()->mShowFullMenu ) { 701 if ( KOPrefs::instance()->mShowFullMenu ) {
685 menuBar1 = new KMenuBar( this );//menuBar(); 702 menuBar1 = new KMenuBar( this );//menuBar();
703 //setMenuBar( menuBar1 );
704 menuBar1->show();
686 menuBar1->insertItem( i18n("File"), importMenu ); 705 menuBar1->insertItem( i18n("File"), importMenu );
687 menuBar1->insertItem( i18n("View"), viewMenu ); 706 menuBar1->insertItem( i18n("View"), viewMenu );
688 menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu ); 707 menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu );
689 menuBar1->insertItem( i18n("Action"), actionMenu ); 708 menuBar1->insertItem( i18n("Action"), actionMenu );
690#ifdef DESKTOP_VERSION 709#ifdef DESKTOP_VERSION
691 menuBar1->insertItem( i18n("Synchronize"), syncMenu ); 710 menuBar1->insertItem( i18n("Synchronize"), syncMenu );
@@ -711,14 +730,16 @@ void MainWindow::initActions()
711 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 730 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
712 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); 731 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
713 menuBar->insertItem( i18n("Filter"),selectFilterMenu ); 732 menuBar->insertItem( i18n("Filter"),selectFilterMenu );
714 menuBar->insertItem( i18n("Help"), helpMenu ); 733 menuBar->insertItem( i18n("Help"), helpMenu );
715 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); 734 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
716 menuBar1->setMaximumSize( menuBar1->sizeHint( )); 735 menuBar1->setMaximumSize( menuBar1->sizeHint( ));
736 connect ( menuBar, SIGNAL( aboutToHide () ), this, SLOT ( slotResetFocus() ) );
717 } 737 }
718 connect ( menuBar1, SIGNAL( lostFocus () ), mView, SLOT ( slotResetFocus() ) ); 738 connect ( menuBar1, SIGNAL( lostFocus () ), this, SLOT ( slotResetFocus() ) );
739 //connect ( menuBar1, SIGNAL( lostFocus () ), this, SLOT ( slotResetFocus() ) );
719 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 740 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
720 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); 741 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
721 742
722 743
723 mWeekBgColor = iconToolBar->backgroundColor(); 744 mWeekBgColor = iconToolBar->backgroundColor();
724 mWeekPixmap.resize( pixWid , pixHei ); 745 mWeekPixmap.resize( pixWid , pixHei );