-rw-r--r-- | korganizer/koeventviewer.cpp | 12 | ||||
-rw-r--r-- | korganizer/koeventviewer.h | 1 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 26 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 2 |
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) | |||
684 | 684 | ||
685 | void KOEventViewer::clearEvents(bool now) | 685 | void KOEventViewer::clearEvents(bool now) |
686 | { | 686 | { |
687 | mText = ""; | 687 | mText = ""; |
688 | if (now) setText(mText); | 688 | if (now) setText(mText); |
689 | } | 689 | } |
690 | 690 | ||
691 | void KOEventViewer::addText(QString text) | 691 | void KOEventViewer::addText(QString text) |
692 | { | 692 | { |
693 | mText.append(text); | 693 | mText.append(text); |
694 | setText(mText); | 694 | setText(mText); |
695 | } | 695 | } |
696 | void KOEventViewer::keyPressEvent ( QKeyEvent * e ) | ||
697 | { | ||
698 | switch ( e->key() ) { | ||
699 | case Qt::Key_Return: | ||
700 | case Qt::Key_Enter : | ||
701 | e->ignore(); | ||
702 | break; | ||
703 | default: | ||
704 | QTextBrowser::keyPressEvent ( e ); | ||
705 | break; | ||
706 | } | ||
707 | } | ||
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 { | |||
51 | void addText(QString text); | 51 | void addText(QString text); |
52 | void setSyncMode( bool ); | 52 | void setSyncMode( bool ); |
53 | void setColorMode( int ); | 53 | void setColorMode( int ); |
54 | void mailToAttendees( bool all ); | 54 | void mailToAttendees( bool all ); |
55 | 55 | ||
56 | protected: | 56 | protected: |
57 | int mColorMode; | 57 | int mColorMode; |
58 | void addTag(const QString & tag,const QString & text); | 58 | void addTag(const QString & tag,const QString & text); |
59 | 59 | ||
60 | void formatCategories(Incidence *event); | 60 | void formatCategories(Incidence *event); |
61 | void formatAttendees(Incidence *event); | 61 | void formatAttendees(Incidence *event); |
62 | void formatReadOnly(Incidence *event); | 62 | void formatReadOnly(Incidence *event); |
63 | void keyPressEvent ( QKeyEvent * e ); | ||
63 | 64 | ||
64 | private: | 65 | private: |
65 | QTextBrowser *mEventTextView; | 66 | QTextBrowser *mEventTextView; |
66 | bool mSyncMode; | 67 | bool mSyncMode; |
67 | 68 | ||
68 | QString mText; | 69 | QString mText; |
69 | QString mMailSubject; | 70 | QString mMailSubject; |
70 | Incidence* mCurrentIncidence; | 71 | Incidence* mCurrentIncidence; |
71 | signals: | 72 | signals: |
72 | void launchaddressbook(QString uid); | 73 | void launchaddressbook(QString uid); |
73 | }; | 74 | }; |
74 | 75 | ||
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) | |||
68 | KOEventViewerDialog::~KOEventViewerDialog() | 68 | KOEventViewerDialog::~KOEventViewerDialog() |
69 | { | 69 | { |
70 | //qDebug("-------~KOEventViewerDialog() "); | 70 | //qDebug("-------~KOEventViewerDialog() "); |
71 | } | 71 | } |
72 | void KOEventViewerDialog::showMe() | 72 | void KOEventViewerDialog::showMe() |
73 | { | 73 | { |
74 | 74 | ||
75 | #ifdef DESKTOP_VERSION | 75 | #ifdef DESKTOP_VERSION |
76 | show(); | 76 | show(); |
77 | #else | 77 | #else |
78 | showMaximized(); | 78 | showMaximized(); |
79 | #endif | 79 | #endif |
80 | setFocus(); | ||
81 | setActiveWindow(); | 80 | setActiveWindow(); |
81 | mEventViewer->setFocus(); | ||
82 | 82 | ||
83 | } | 83 | } |
84 | void KOEventViewerDialog::setSyncMode( bool b ) | 84 | void KOEventViewerDialog::setSyncMode( bool b ) |
85 | { | 85 | { |
86 | mSyncMode = b; | 86 | mSyncMode = b; |
87 | //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); | 87 | //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); |
88 | if ( mSyncMode ) { | 88 | if ( mSyncMode ) { |
89 | findButton( Close )->setText( i18n("Cancel Sync")); | 89 | findButton( Close )->setText( i18n("Cancel Sync")); |
90 | findButton( Ok )->setText( i18n("Remote")); | 90 | findButton( Ok )->setText( i18n("Remote")); |
91 | findButton( User1 )->setText( i18n("Local")); | 91 | findButton( User1 )->setText( i18n("Local")); |
92 | } else { | 92 | } else { |
93 | findButton( Close )->setText( i18n("Close")); | 93 | findButton( Close )->setText( i18n("Close")); |
@@ -110,26 +110,27 @@ int KOEventViewerDialog::executeS( bool local ) | |||
110 | exec(); | 110 | exec(); |
111 | return mSyncResult; | 111 | return mSyncResult; |
112 | } | 112 | } |
113 | 113 | ||
114 | void KOEventViewerDialog::updateConfig() | 114 | void KOEventViewerDialog::updateConfig() |
115 | { | 115 | { |
116 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); | 116 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); |
117 | 117 | ||
118 | } | 118 | } |
119 | void KOEventViewerDialog::setEvent(Event *event) | 119 | void KOEventViewerDialog::setEvent(Event *event) |
120 | { | 120 | { |
121 | mEventViewer->setEvent(event); | 121 | mEventViewer->setEvent(event); |
122 | mIncidence = event; | 122 | mIncidence = event; |
123 | findButton( Close )->setFocus(); | 123 | mEventViewer->setFocus(); |
124 | //findButton( Close )->setFocus(); | ||
124 | if ( !mSyncMode ) { | 125 | if ( !mSyncMode ) { |
125 | findButton( User1 )->setText( i18n("Agenda")); | 126 | findButton( User1 )->setText( i18n("Agenda")); |
126 | } | 127 | } |
127 | } | 128 | } |
128 | void KOEventViewerDialog::setIncidence(Incidence *in ) | 129 | void KOEventViewerDialog::setIncidence(Incidence *in ) |
129 | { | 130 | { |
130 | if ( in->type() == "Event" ) | 131 | if ( in->type() == "Event" ) |
131 | setEvent( (Event*) in ); | 132 | setEvent( (Event*) in ); |
132 | else if ( in->type() =="Todo" ) | 133 | else if ( in->type() =="Todo" ) |
133 | setTodo( (Todo*) in ); | 134 | setTodo( (Todo*) in ); |
134 | else if ( in->type() =="Journal" ) | 135 | else if ( in->type() =="Journal" ) |
135 | setJournal( (Journal*) in ); | 136 | setJournal( (Journal*) in ); |
@@ -143,53 +144,57 @@ void KOEventViewerDialog::addIncidence(Incidence *in) | |||
143 | else if ( in->type() =="Journal" ) | 144 | else if ( in->type() =="Journal" ) |
144 | mEventViewer->setJournal( (Journal*) in, false ); | 145 | mEventViewer->setJournal( (Journal*) in, false ); |
145 | if ( mSyncMode ) { | 146 | if ( mSyncMode ) { |
146 | findButton( User1 )->setFocus(); | 147 | findButton( User1 )->setFocus(); |
147 | setCaption(i18n("Conflict! Please choose entry")); | 148 | setCaption(i18n("Conflict! Please choose entry")); |
148 | } | 149 | } |
149 | } | 150 | } |
150 | 151 | ||
151 | void KOEventViewerDialog::addEvent(Event *event) | 152 | void KOEventViewerDialog::addEvent(Event *event) |
152 | { | 153 | { |
153 | mEventViewer->addEvent(event); | 154 | mEventViewer->addEvent(event); |
154 | mIncidence = event; | 155 | mIncidence = event; |
155 | findButton( Close )->setFocus(); | 156 | mEventViewer->setFocus(); |
157 | //findButton( Close )->setFocus(); | ||
156 | if ( !mSyncMode ) { | 158 | if ( !mSyncMode ) { |
157 | findButton( User1 )->setText( i18n("Agenda")); | 159 | findButton( User1 )->setText( i18n("Agenda")); |
158 | } | 160 | } |
159 | } | 161 | } |
160 | 162 | ||
161 | void KOEventViewerDialog::setTodo(Todo *event) | 163 | void KOEventViewerDialog::setTodo(Todo *event) |
162 | { | 164 | { |
163 | mEventViewer->setTodo(event); | 165 | mEventViewer->setTodo(event); |
164 | mIncidence = (Incidence*)event; | 166 | mIncidence = (Incidence*)event; |
165 | findButton( Close )->setFocus(); | 167 | mEventViewer->setFocus(); |
168 | //findButton( Close )->setFocus(); | ||
166 | if ( !mSyncMode ) { | 169 | if ( !mSyncMode ) { |
167 | findButton( User1 )->setText( i18n("Set complete")); | 170 | findButton( User1 )->setText( i18n("Set complete")); |
168 | } | 171 | } |
169 | } | 172 | } |
170 | void KOEventViewerDialog::setJournal(Journal *j) | 173 | void KOEventViewerDialog::setJournal(Journal *j) |
171 | { | 174 | { |
172 | mEventViewer->setJournal(j); | 175 | mEventViewer->setJournal(j); |
173 | mIncidence = (Incidence*)j; | 176 | mIncidence = (Incidence*)j; |
174 | findButton( Close )->setFocus(); | 177 | mEventViewer->setFocus(); |
178 | //findButton( Close )->setFocus(); | ||
175 | if ( !mSyncMode ) { | 179 | if ( !mSyncMode ) { |
176 | findButton( User1 )->setText( i18n("Agenda")); | 180 | findButton( User1 )->setText( i18n("Agenda")); |
177 | } | 181 | } |
178 | } | 182 | } |
179 | 183 | ||
180 | void KOEventViewerDialog::addText(QString text) | 184 | void KOEventViewerDialog::addText(QString text) |
181 | { | 185 | { |
182 | mEventViewer->addText(text); | 186 | mEventViewer->addText(text); |
183 | findButton( Close )->setFocus(); | 187 | mEventViewer->setFocus(); |
188 | //findButton( Close )->setFocus(); | ||
184 | } | 189 | } |
185 | void KOEventViewerDialog::editIncidence() | 190 | void KOEventViewerDialog::editIncidence() |
186 | { | 191 | { |
187 | if ( mSyncMode ) { | 192 | if ( mSyncMode ) { |
188 | mSyncResult = 2; | 193 | mSyncResult = 2; |
189 | accept(); | 194 | accept(); |
190 | return; | 195 | return; |
191 | } | 196 | } |
192 | if ( mIncidence ){ | 197 | if ( mIncidence ){ |
193 | #ifndef DESKTOP_VERSION | 198 | #ifndef DESKTOP_VERSION |
194 | hide(); | 199 | hide(); |
195 | #endif | 200 | #endif |
@@ -245,16 +250,17 @@ void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) | |||
245 | case Qt::Key_E : | 250 | case Qt::Key_E : |
246 | case Qt::Key_R : | 251 | case Qt::Key_R : |
247 | editIncidence(); | 252 | editIncidence(); |
248 | break; | 253 | break; |
249 | case Qt::Key_C: | 254 | case Qt::Key_C: |
250 | case Qt::Key_Escape: | 255 | case Qt::Key_Escape: |
251 | close(); | 256 | close(); |
252 | break; | 257 | break; |
253 | case Qt::Key_I: | 258 | case Qt::Key_I: |
254 | accept(); | 259 | accept(); |
255 | break; | 260 | break; |
256 | default: | 261 | default: |
262 | KDialogBase::keyPressEvent ( e ); | ||
257 | break; | 263 | break; |
258 | } | 264 | } |
259 | 265 | ||
260 | } | 266 | } |
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) | |||
75 | layout->addWidget(incidenceGroup); | 75 | layout->addWidget(incidenceGroup); |
76 | 76 | ||
77 | mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); | 77 | mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); |
78 | mSearchEvent->setChecked(true); | 78 | mSearchEvent->setChecked(true); |
79 | mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); | 79 | mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); |
80 | mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); | 80 | mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); |
81 | 81 | ||
82 | QHBox *subjectGroup = new QHBox( topFrame ); | 82 | QHBox *subjectGroup = new QHBox( topFrame ); |
83 | layout->addWidget(subjectGroup); | 83 | layout->addWidget(subjectGroup); |
84 | 84 | ||
85 | mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); | 85 | mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); |
86 | mSummaryCheck->setChecked(true); | 86 | mSummaryCheck->setChecked(true); |
87 | mDescriptionCheck = new QCheckBox(i18n("Descriptions"),subjectGroup); | 87 | mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup); |
88 | mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); | 88 | mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); |
89 | 89 | ||
90 | QHBox *attendeeGroup = new QHBox( topFrame ); | 90 | QHBox *attendeeGroup = new QHBox( topFrame ); |
91 | layout->addWidget(attendeeGroup ); | 91 | layout->addWidget(attendeeGroup ); |
92 | new QLabel( i18n("Attendee:"),attendeeGroup ); | 92 | new QLabel( i18n("Attendee:"),attendeeGroup ); |
93 | mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); | 93 | mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); |
94 | mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); | 94 | mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); |
95 | // Date range | 95 | // Date range |
96 | // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), | 96 | // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), |
97 | // topFrame); | 97 | // topFrame); |
98 | // layout->addWidget(rangeGroup); | 98 | // layout->addWidget(rangeGroup); |
99 | 99 | ||