summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-02-23 14:09:49 (UTC)
committer zautrix <zautrix>2005-02-23 14:09:49 (UTC)
commitfaedffc5ce8391204e0340a21eaaf582319ac824 (patch) (side-by-side diff)
treecef25226d049d6a370bce9444edad171f4b24e97 /korganizer
parent36704cb63582c161d2ab5c63e66ee63bbf3b865f (diff)
downloadkdepimpi-faedffc5ce8391204e0340a21eaaf582319ac824.zip
kdepimpi-faedffc5ce8391204e0340a21eaaf582319ac824.tar.gz
kdepimpi-faedffc5ce8391204e0340a21eaaf582319ac824.tar.bz2
focus fixes
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp12
-rw-r--r--korganizer/koeventviewer.h1
-rw-r--r--korganizer/koeventviewerdialog.cpp18
-rw-r--r--korganizer/searchdialog.cpp2
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
@@ -690,6 +690,18 @@ void KOEventViewer::clearEvents(bool now)
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
@@ -57,12 +57,13 @@ class KOEventViewer : public QTextBrowser {
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;
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index f6f7258..23e62d3 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -74,14 +74,14 @@ 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 );
@@ -117,13 +117,14 @@ void KOEventViewerDialog::updateConfig()
}
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 )
{
@@ -149,41 +150,45 @@ void KOEventViewerDialog::addIncidence(Incidence *in)
}
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();
@@ -251,10 +256,11 @@ void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e )
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
@@ -81,13 +81,13 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
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 );