author | zautrix <zautrix> | 2005-11-12 22:23:02 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-11-12 22:23:02 (UTC) |
commit | 9e47202fd38512cc523c09cf8878f4c5d836e777 (patch) (side-by-side diff) | |
tree | fa35760dc12d7176e3c2e63c22c6482601f7e59d | |
parent | f1b53f2c08c2ce384f663ae6f0a818104db8c53e (diff) | |
download | kdepimpi-9e47202fd38512cc523c09cf8878f4c5d836e777.zip kdepimpi-9e47202fd38512cc523c09cf8878f4c5d836e777.tar.gz kdepimpi-9e47202fd38512cc523c09cf8878f4c5d836e777.tar.bz2 |
fix
-rw-r--r-- | korganizer/journalentry.cpp | 14 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index 7f6f221..5269af7 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp @@ -130,12 +130,16 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : //mCalendarBox->setMaximumWidth( maxwid/2 -20 ); mEditor->setWordWrap( KTextEdit::WidgetWidth ); QBoxLayout *topLayout = new QVBoxLayout(this); topLayout->addWidget(vb); topLayout->addWidget(mEditor); mEditor->installEventFilter(this); + installEventFilter(this); + mTitle->installEventFilter(this); + setFocusPolicy (QWidget::NoFocus); + connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); connect( toggleJournal, SIGNAL( clicked() ), this , SLOT( toggleShowJournal() ) ); mTitle->load( KOLocationBox::SUMMARYJOURNAL ); mTitle->lineEdit ()->setText(""); } @@ -308,18 +312,26 @@ void JournalEntry::clear() mTitle->lineEdit ()->setText(""); } bool JournalEntry::eventFilter( QObject *o, QEvent *e ) { // kdDebug() << "JournalEntry::event received " << e->type() << endl; - + if ( isVisible() ) { + mEditor->setFocusPolicy (QWidget::StrongFocus); + mTitle->setFocusPolicy (QWidget::StrongFocus); + } else { + mEditor->setFocusPolicy (QWidget::NoFocus); + mTitle->setFocusPolicy (QWidget::NoFocus); + } if ( e->type() == QEvent::FocusOut ) { writeJournal(); } if ( e->type() == QEvent::KeyPress ) { QKeyEvent * k = (QKeyEvent *) e; + if ( !isVisible() ) + return true; if ( k->state() == Qt::ControlButton ) { k->ignore(); //return true; } } diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 4fc1194..b378330 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -1291,12 +1291,13 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) } } KOListViewListView::KOListViewListView(KOListView * lv ) : KListView( lv, "kolistlistview", false ) { mYMousePos = 0; + setAllColumnsShowFocus( true ); mPopupTimer = new QTimer(this); connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); #ifndef DESKTOP_VERSION //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); #endif setSelectionMode( QListView::Multi ); |