summaryrefslogtreecommitdiffabout
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
parent36704cb63582c161d2ab5c63e66ee63bbf3b865f (diff)
downloadkdepimpi-faedffc5ce8391204e0340a21eaaf582319ac824.zip
kdepimpi-faedffc5ce8391204e0340a21eaaf582319ac824.tar.gz
kdepimpi-faedffc5ce8391204e0340a21eaaf582319ac824.tar.bz2
focus fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp12
-rw-r--r--korganizer/koeventviewer.h1
-rw-r--r--korganizer/koeventviewerdialog.cpp26
-rw-r--r--korganizer/searchdialog.cpp2
4 files changed, 30 insertions, 11 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 417d89c..44da058 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -684,12 +684,24 @@ void KOEventViewer::addEvent(Event *event)
void KOEventViewer::clearEvents(bool now)
{
mText = "";
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
@@ -51,24 +51,25 @@ class KOEventViewer : public QTextBrowser {
void addText(QString text);
void setSyncMode( bool );
void setColorMode( int );
void mailToAttendees( bool all );
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;
signals:
void launchaddressbook(QString uid);
};
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index f6f7258..23e62d3 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -68,26 +68,26 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name)
KOEventViewerDialog::~KOEventViewerDialog()
{
//qDebug("-------~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"));
findButton( Ok )->setText( i18n("Remote"));
findButton( User1 )->setText( i18n("Local"));
} else {
findButton( Close )->setText( i18n("Close"));
@@ -110,26 +110,27 @@ int KOEventViewerDialog::executeS( bool local )
exec();
return mSyncResult;
}
void KOEventViewerDialog::updateConfig()
{
mEventViewer->setFont( KOPrefs::instance()->mEventViewFont );
}
void KOEventViewerDialog::setEvent(Event *event)
{
mEventViewer->setEvent(event);
- mIncidence = event;
- findButton( Close )->setFocus();
+ mIncidence = event;
+ mEventViewer->setFocus();
+ //findButton( Close )->setFocus();
if ( !mSyncMode ) {
findButton( User1 )->setText( i18n("Agenda"));
}
}
void KOEventViewerDialog::setIncidence(Incidence *in )
{
if ( in->type() == "Event" )
setEvent( (Event*) in );
else if ( in->type() =="Todo" )
setTodo( (Todo*) in );
else if ( in->type() =="Journal" )
setJournal( (Journal*) in );
@@ -143,53 +144,57 @@ void KOEventViewerDialog::addIncidence(Incidence *in)
else if ( in->type() =="Journal" )
mEventViewer->setJournal( (Journal*) in, false );
if ( mSyncMode ) {
findButton( User1 )->setFocus();
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();
+ mIncidence = (Incidence*)event;
+ 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();
+ mIncidence = (Incidence*)j;
+ mEventViewer->setFocus();
+ //findButton( Close )->setFocus();
if ( !mSyncMode ) {
findButton( User1 )->setText( i18n("Agenda"));
}
}
void KOEventViewerDialog::addText(QString text)
{
- mEventViewer->addText(text);
- findButton( Close )->setFocus();
+ mEventViewer->addText(text);
+ mEventViewer->setFocus();
+ //findButton( Close )->setFocus();
}
void KOEventViewerDialog::editIncidence()
{
if ( mSyncMode ) {
mSyncResult = 2;
accept();
return;
}
if ( mIncidence ){
#ifndef DESKTOP_VERSION
hide();
#endif
@@ -245,16 +250,17 @@ void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e )
case Qt::Key_E :
case Qt::Key_R :
editIncidence();
break;
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
@@ -75,25 +75,25 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
layout->addWidget(incidenceGroup);
mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup);
mSearchEvent->setChecked(true);
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
// QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"),
// topFrame);
// layout->addWidget(rangeGroup);