author | zautrix <zautrix> | 2005-02-23 14:09:49 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-23 14:09:49 (UTC) |
commit | faedffc5ce8391204e0340a21eaaf582319ac824 (patch) (side-by-side diff) | |
tree | cef25226d049d6a370bce9444edad171f4b24e97 | |
parent | 36704cb63582c161d2ab5c63e66ee63bbf3b865f (diff) | |
download | kdepimpi-faedffc5ce8391204e0340a21eaaf582319ac824.zip kdepimpi-faedffc5ce8391204e0340a21eaaf582319ac824.tar.gz kdepimpi-faedffc5ce8391204e0340a21eaaf582319ac824.tar.bz2 |
focus fixes
-rw-r--r-- | korganizer/koeventviewer.cpp | 12 | ||||
-rw-r--r-- | korganizer/koeventviewer.h | 1 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 18 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 2 |
4 files changed, 26 insertions, 7 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 417d89c..44da058 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -688,8 +688,20 @@ void KOEventViewer::clearEvents(bool now) if (now) setText(mText); } void KOEventViewer::addText(QString text) { mText.append(text); setText(mText); } +void KOEventViewer::keyPressEvent ( QKeyEvent * e ) +{ + switch ( e->key() ) { + case Qt::Key_Return: + case Qt::Key_Enter : + e->ignore(); + break; + default: + QTextBrowser::keyPressEvent ( e ); + break; + } +} diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h index cf44284..d8142ca 100644 --- a/korganizer/koeventviewer.h +++ b/korganizer/koeventviewer.h @@ -55,16 +55,17 @@ class KOEventViewer : public QTextBrowser { protected: int mColorMode; void addTag(const QString & tag,const QString & text); void formatCategories(Incidence *event); void formatAttendees(Incidence *event); void formatReadOnly(Incidence *event); + void keyPressEvent ( QKeyEvent * e ); private: QTextBrowser *mEventTextView; bool mSyncMode; QString mText; QString mMailSubject; Incidence* mCurrentIncidence; diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index f6f7258..23e62d3 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -72,18 +72,18 @@ KOEventViewerDialog::~KOEventViewerDialog() void KOEventViewerDialog::showMe() { #ifdef DESKTOP_VERSION show(); #else showMaximized(); #endif - setFocus(); setActiveWindow(); + mEventViewer->setFocus(); } void KOEventViewerDialog::setSyncMode( bool b ) { mSyncMode = b; //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); if ( mSyncMode ) { findButton( Close )->setText( i18n("Cancel Sync")); @@ -115,17 +115,18 @@ void KOEventViewerDialog::updateConfig() { mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); } void KOEventViewerDialog::setEvent(Event *event) { mEventViewer->setEvent(event); mIncidence = event; - findButton( Close )->setFocus(); + mEventViewer->setFocus(); + //findButton( Close )->setFocus(); if ( !mSyncMode ) { findButton( User1 )->setText( i18n("Agenda")); } } void KOEventViewerDialog::setIncidence(Incidence *in ) { if ( in->type() == "Event" ) setEvent( (Event*) in ); @@ -147,45 +148,49 @@ void KOEventViewerDialog::addIncidence(Incidence *in) setCaption(i18n("Conflict! Please choose entry")); } } void KOEventViewerDialog::addEvent(Event *event) { mEventViewer->addEvent(event); mIncidence = event; - findButton( Close )->setFocus(); + mEventViewer->setFocus(); + //findButton( Close )->setFocus(); if ( !mSyncMode ) { findButton( User1 )->setText( i18n("Agenda")); } } void KOEventViewerDialog::setTodo(Todo *event) { mEventViewer->setTodo(event); mIncidence = (Incidence*)event; - findButton( Close )->setFocus(); + mEventViewer->setFocus(); + //findButton( Close )->setFocus(); if ( !mSyncMode ) { findButton( User1 )->setText( i18n("Set complete")); } } void KOEventViewerDialog::setJournal(Journal *j) { mEventViewer->setJournal(j); mIncidence = (Incidence*)j; - findButton( Close )->setFocus(); + mEventViewer->setFocus(); + //findButton( Close )->setFocus(); if ( !mSyncMode ) { findButton( User1 )->setText( i18n("Agenda")); } } void KOEventViewerDialog::addText(QString text) { mEventViewer->addText(text); - findButton( Close )->setFocus(); + mEventViewer->setFocus(); + //findButton( Close )->setFocus(); } void KOEventViewerDialog::editIncidence() { if ( mSyncMode ) { mSyncResult = 2; accept(); return; } @@ -249,12 +254,13 @@ void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) case Qt::Key_C: case Qt::Key_Escape: close(); break; case Qt::Key_I: accept(); break; default: + KDialogBase::keyPressEvent ( e ); break; } } diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index aa1b244..cef59a2 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -79,17 +79,17 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); QHBox *subjectGroup = new QHBox( topFrame ); layout->addWidget(subjectGroup); mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); mSummaryCheck->setChecked(true); - mDescriptionCheck = new QCheckBox(i18n("Descriptions"),subjectGroup); + mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup); mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); QHBox *attendeeGroup = new QHBox( topFrame ); layout->addWidget(attendeeGroup ); new QLabel( i18n("Attendee:"),attendeeGroup ); mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); // Date range |