summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-10 12:06:17 (UTC)
committer zautrix <zautrix>2005-07-10 12:06:17 (UTC)
commita49b694c286167745886996d990f524f9141adbd (patch) (side-by-side diff)
treefe446c465bfbba1d068024449b18642de53dc0f1 /korganizer
parent58b7818a74809dc9280a3249eeb7e0195a66f93d (diff)
downloadkdepimpi-a49b694c286167745886996d990f524f9141adbd.zip
kdepimpi-a49b694c286167745886996d990f524f9141adbd.tar.gz
kdepimpi-a49b694c286167745886996d990f524f9141adbd.tar.bz2
fixx
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp7
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/mainwindow.cpp27
-rw-r--r--korganizer/mainwindow.h5
4 files changed, 30 insertions, 10 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 17f1659..a9e402e 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -367,7 +367,7 @@ CalendarView::CalendarView( Calendar *calendar,
void CalendarView::init()
{
mNextAlarmDateTime = QDateTime::currentDateTime();
- //setFocusPolicy ( NoFocus );
+ setFocusPolicy (NoFocus );
mViewerCallerIsSearchDialog = false;
mBlockShowDates = false;
@@ -656,11 +656,6 @@ CalendarView::~CalendarView()
//kdDebug() << "~CalendarView() done" << endl;
}
-void CalendarView::slotResetFocus()
-{
- qDebug(" CalendarView::slotResetFocus() %x", qApp->focusWidget());
-
-}
void CalendarView::nextConflict( bool all, bool allday )
{
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 456c2d7..1debef7 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -201,7 +201,6 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
public slots:
- void slotResetFocus();
void nextConflict( bool all, bool allday );
void conflictAll();
void conflictAllday();
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 21d5a35..279955f 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -423,7 +423,24 @@ MainWindow::~MainWindow()
}
-
+void MainWindow::slotResetFocus()
+{
+ //qDebug(" CalendarView::slotResetFocus() %x %x %x %x", qApp->focusWidget(), menuBar1, mView,iconToolBar);
+ mFocusLoop = 3;
+ QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() ));
+}
+void MainWindow::slotResetFocusLoop()
+{
+ --mFocusLoop;
+ QWidget* fw = mView->viewManager()->currentView();
+ if ( fw ) {
+ //qDebug("loop ");
+ fw->setFocus();
+ if ( qApp->focusWidget() != fw && mFocusLoop > 0 )
+ QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() ));
+ }
+
+}
void MainWindow::disableBR(bool b)
{
#ifndef DESKTOP_VERSION
@@ -680,9 +697,11 @@ void MainWindow::initActions()
pathString += "iconsmini/";
pixWid = 18; pixHei = 16;
}
- KMenuBar *menuBar1;
+
if ( KOPrefs::instance()->mShowFullMenu ) {
menuBar1 = new KMenuBar( this );//menuBar();
+ //setMenuBar( menuBar1 );
+ menuBar1->show();
menuBar1->insertItem( i18n("File"), importMenu );
menuBar1->insertItem( i18n("View"), viewMenu );
menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu );
@@ -714,8 +733,10 @@ void MainWindow::initActions()
menuBar->insertItem( i18n("Help"), helpMenu );
//menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
menuBar1->setMaximumSize( menuBar1->sizeHint( ));
+ connect ( menuBar, SIGNAL( aboutToHide () ), this, SLOT ( slotResetFocus() ) );
}
- connect ( menuBar1, SIGNAL( lostFocus () ), mView, SLOT ( slotResetFocus() ) );
+ connect ( menuBar1, SIGNAL( lostFocus () ), this, SLOT ( slotResetFocus() ) );
+ //connect ( menuBar1, SIGNAL( lostFocus () ), this, SLOT ( slotResetFocus() ) );
connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index e2de3ba..7d3d492 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -102,17 +102,21 @@ class MainWindow : public QMainWindow
signals:
void selectWeek ( int );
private slots:
+ void slotResetFocus();
+ void slotResetFocusLoop();
void showConfigureAgenda();
void getFile( bool );
void syncFileRequest();
protected:
+ int mFocusLoop;
void hideEvent ( QHideEvent * );
QString sentSyncFile();
void displayText( QString, QString);
void enableIncidenceActions( bool );
private:
+ //void setMenuBar( QMenuBar * );
bool mBRdisabled;
#ifndef DESKTOP_VERSION
QCopChannel* infrared;
@@ -123,6 +127,7 @@ class MainWindow : public QMainWindow
void saveOnClose();
bool mFlagKeyPressed;
bool mBlockAtStartup;
+ KMenuBar *menuBar1;
QPEToolBar *iconToolBar;
QPEToolBar *viewToolBar;
QPEToolBar *navigatorToolBar;