summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Unidiff
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
@@ -425,3 +425,20 @@ MainWindow::~MainWindow()
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)
@@ -682,5 +699,7 @@ void MainWindow::initActions()
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 );
@@ -716,4 +735,6 @@ void MainWindow::initActions()
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 ) ) );