author | zautrix <zautrix> | 2005-11-12 22:23:02 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-11-12 22:23:02 (UTC) |
commit | 9e47202fd38512cc523c09cf8878f4c5d836e777 (patch) (unidiff) | |
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 | |||
@@ -133,6 +133,10 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | |||
133 | topLayout->addWidget(vb); | 133 | topLayout->addWidget(vb); |
134 | topLayout->addWidget(mEditor); | 134 | topLayout->addWidget(mEditor); |
135 | mEditor->installEventFilter(this); | 135 | mEditor->installEventFilter(this); |
136 | installEventFilter(this); | ||
137 | mTitle->installEventFilter(this); | ||
138 | setFocusPolicy (QWidget::NoFocus); | ||
139 | |||
136 | connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); | 140 | connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); |
137 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); | 141 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); |
138 | connect( toggleJournal, SIGNAL( clicked() ), this , SLOT( toggleShowJournal() ) ); | 142 | connect( toggleJournal, SIGNAL( clicked() ), this , SLOT( toggleShowJournal() ) ); |
@@ -311,12 +315,20 @@ void JournalEntry::clear() | |||
311 | bool JournalEntry::eventFilter( QObject *o, QEvent *e ) | 315 | bool JournalEntry::eventFilter( QObject *o, QEvent *e ) |
312 | { | 316 | { |
313 | // kdDebug() << "JournalEntry::event received " << e->type() << endl; | 317 | // kdDebug() << "JournalEntry::event received " << e->type() << endl; |
314 | 318 | if ( isVisible() ) { | |
319 | mEditor->setFocusPolicy (QWidget::StrongFocus); | ||
320 | mTitle->setFocusPolicy (QWidget::StrongFocus); | ||
321 | } else { | ||
322 | mEditor->setFocusPolicy (QWidget::NoFocus); | ||
323 | mTitle->setFocusPolicy (QWidget::NoFocus); | ||
324 | } | ||
315 | if ( e->type() == QEvent::FocusOut ) { | 325 | if ( e->type() == QEvent::FocusOut ) { |
316 | writeJournal(); | 326 | writeJournal(); |
317 | } | 327 | } |
318 | if ( e->type() == QEvent::KeyPress ) { | 328 | if ( e->type() == QEvent::KeyPress ) { |
319 | QKeyEvent * k = (QKeyEvent *) e; | 329 | QKeyEvent * k = (QKeyEvent *) e; |
330 | if ( !isVisible() ) | ||
331 | return true; | ||
320 | if ( k->state() == Qt::ControlButton ) { | 332 | if ( k->state() == Qt::ControlButton ) { |
321 | k->ignore(); | 333 | k->ignore(); |
322 | //return true; | 334 | //return true; |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 4fc1194..b378330 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -1294,6 +1294,7 @@ KOListViewListView::KOListViewListView(KOListView * lv ) | |||
1294 | : KListView( lv, "kolistlistview", false ) | 1294 | : KListView( lv, "kolistlistview", false ) |
1295 | { | 1295 | { |
1296 | mYMousePos = 0; | 1296 | mYMousePos = 0; |
1297 | setAllColumnsShowFocus( true ); | ||
1297 | mPopupTimer = new QTimer(this); | 1298 | mPopupTimer = new QTimer(this); |
1298 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); | 1299 | connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); |
1299 | #ifndef DESKTOP_VERSION | 1300 | #ifndef DESKTOP_VERSION |