-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 5 | ||||
-rw-r--r-- | korganizer/journalentry.cpp | 53 | ||||
-rw-r--r-- | korganizer/journalentry.h | 4 | ||||
-rw-r--r-- | korganizer/kodaymatrix.cpp | 27 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 3 | ||||
-rw-r--r-- | korganizer/kojournalview.cpp | 22 | ||||
-rw-r--r-- | korganizer/kojournalview.h | 2 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 14 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 37 |
9 files changed, 113 insertions, 54 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 4df2005..510f4bf 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1461,7 +1461,12 @@ | |||
1461 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, | 1461 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, |
1462 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, | 1462 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, |
1463 | { "Reload","Neu laden" }, | 1463 | { "Reload","Neu laden" }, |
1464 | { "Timezone settings","Zeitzoneneinstellung" }, | 1464 | { "Timezone settings","Zeitzoneneinstellung" }, |
1465 | { " Title: "," Titel: " }, | ||
1466 | { "","" }, | ||
1467 | { "","" }, | ||
1468 | { "","" }, | ||
1469 | { "","" }, | ||
1465 | { "","" }, | 1470 | { "","" }, |
1466 | { "","" }, | 1471 | { "","" }, |
1467 | { "","" }, \ No newline at end of file | 1472 | { "","" }, \ No newline at end of file |
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index 0b923ad..05bfd31 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp | |||
@@ -41,8 +41,9 @@ | |||
41 | #include <ktextedit.h> | 41 | #include <ktextedit.h> |
42 | #include <kfiledialog.h> | 42 | #include <kfiledialog.h> |
43 | #include <kmessagebox.h> | 43 | #include <kmessagebox.h> |
44 | #include "koprefs.h" | 44 | #include "koprefs.h" |
45 | #include <klineedit.h> | ||
45 | 46 | ||
46 | #include <libkcal/journal.h> | 47 | #include <libkcal/journal.h> |
47 | #include <libkcal/calendarresources.h> | 48 | #include <libkcal/calendarresources.h> |
48 | #include <libkcal/resourcecalendar.h> | 49 | #include <libkcal/resourcecalendar.h> |
@@ -62,29 +63,19 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | |||
62 | mJournal = 0; | 63 | mJournal = 0; |
63 | mDirty = false; | 64 | mDirty = false; |
64 | 65 | ||
65 | QHBox * vb = new QHBox ( this ); | 66 | QHBox * vb = new QHBox ( this ); |
66 | QPushButton * newJournal = new QPushButton( vb ); | ||
67 | QIconSet icon; | 67 | QIconSet icon; |
68 | if ( QApplication::desktop()->width() < 321 ) | ||
69 | icon = SmallIcon("ko16old"); | ||
70 | else | ||
71 | icon = SmallIcon("ko24old"); | ||
72 | newJournal->setIconSet (icon ) ; | ||
73 | int size = newJournal->sizeHint().height(); | ||
74 | newJournal->setFixedSize( size, size ); | ||
75 | |||
76 | 68 | ||
77 | QPushButton * toggleJournal = new QPushButton( vb ); | 69 | QPushButton * toggleJournal = new QPushButton( vb ); |
78 | icon = SmallIcon("1updownarrow"); | 70 | icon = SmallIcon("1updownarrow"); |
79 | toggleJournal->setIconSet (icon ) ; | 71 | toggleJournal->setIconSet (icon ) ; |
80 | //int size = toggleJournal->sizeHint().height(); | 72 | int size = toggleJournal->sizeHint().height(); |
81 | toggleJournal->setFixedSize( size * 2 /3 , size ); | 73 | toggleJournal->setFixedSize( size * 2 /3 , size ); |
82 | 74 | new QLabel(i18n(" Title: "),vb); | |
83 | 75 | mTitle = new KLineEdit ( vb ); | |
84 | |||
85 | mTitleLabel = new QLabel(i18n("Title"),vb); | 76 | mTitleLabel = new QLabel(i18n("Title"),vb); |
86 | mTitleLabel->setMargin(2); | 77 | mTitleLabel->setMargin(0); |
87 | mTitleLabel->setAlignment(AlignCenter); | 78 | mTitleLabel->setAlignment(AlignCenter); |
88 | QPushButton * loadTemplate = new QPushButton( vb ); | 79 | QPushButton * loadTemplate = new QPushButton( vb ); |
89 | QPushButton * saveTemplate = new QPushButton( vb ); | 80 | QPushButton * saveTemplate = new QPushButton( vb ); |
90 | if ( QApplication::desktop()->width() < 321 ) | 81 | if ( QApplication::desktop()->width() < 321 ) |
@@ -110,16 +101,16 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | |||
110 | topLayout->addWidget(vb); | 101 | topLayout->addWidget(vb); |
111 | topLayout->addWidget(mEditor); | 102 | topLayout->addWidget(mEditor); |
112 | mEditor->installEventFilter(this); | 103 | mEditor->installEventFilter(this); |
113 | connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); | 104 | connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); |
105 | connect( mTitle, SIGNAL( textChanged ( const QString & ) ), this , SLOT( setDirty() ) ); | ||
114 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); | 106 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); |
115 | connect( newJournal, SIGNAL( clicked() ), this , SIGNAL( newJournal() ) ); | ||
116 | connect( toggleJournal, SIGNAL( clicked() ), this , SLOT( toggleShowJournal() ) ); | 107 | connect( toggleJournal, SIGNAL( clicked() ), this , SLOT( toggleShowJournal() ) ); |
117 | } | 108 | } |
118 | 109 | ||
119 | JournalEntry::~JournalEntry() | 110 | JournalEntry::~JournalEntry() |
120 | { | 111 | { |
121 | qDebug("JournalEntry::~JournalEntry() "); | 112 | //qDebug("JournalEntry::~JournalEntry() "); |
122 | } | 113 | } |
123 | QSize JournalEntry::sizeHint() const | 114 | QSize JournalEntry::sizeHint() const |
124 | { | 115 | { |
125 | return QSize ( 240, heiHint ); | 116 | return QSize ( 240, heiHint ); |
@@ -178,38 +169,37 @@ void JournalEntry::setDate(const QDate &date) | |||
178 | showOnlyMode = false; | 169 | showOnlyMode = false; |
179 | mDate = date; | 170 | mDate = date; |
180 | writeJournal(); | 171 | writeJournal(); |
181 | int id = mCalendar->defaultCalendar(); | 172 | int id = mCalendar->defaultCalendar(); |
182 | if ( id == 1 ) { | 173 | QString calname = KOPrefs::instance()->getCalendar( id )->mName; |
183 | mTitleLabel->setText(KGlobal::locale()->formatDate(date)); | 174 | mTitleLabel->setText( " (" + calname +")"); |
184 | } else { | ||
185 | QString calname = KOPrefs::instance()->getCalendar( id )->mName; | ||
186 | mTitleLabel->setText( KGlobal::locale()->formatDate(mDate,true) + " (" + calname +")"); | ||
187 | } | ||
188 | } | 175 | } |
189 | 176 | ||
190 | void JournalEntry::toggleShowJournal() | 177 | void JournalEntry::toggleShowJournal() |
191 | { | 178 | { |
179 | flushEntry(); | ||
192 | if ( showOnlyMode ) | 180 | if ( showOnlyMode ) |
193 | emit showJournalOnly( 0 ); | 181 | emit showJournalOnly( 0 ); |
194 | else | 182 | else |
195 | emit showJournalOnly( mJournal ); | 183 | emit showJournalOnly( mJournal ); |
196 | } | 184 | } |
197 | 185 | void JournalEntry::setShowOnly() | |
186 | { | ||
187 | showOnlyMode = true; | ||
188 | mEditor->setFocus(); | ||
189 | } | ||
198 | void JournalEntry::setJournal(Journal *journal) | 190 | void JournalEntry::setJournal(Journal *journal) |
199 | { | 191 | { |
200 | writeJournal(); | 192 | writeJournal(); |
201 | 193 | ||
202 | mJournal = journal; | 194 | mJournal = journal; |
203 | 195 | mTitle->setText(mJournal->summary()); | |
204 | mEditor->setText(mJournal->description()); | 196 | mEditor->setText(mJournal->description()); |
205 | int id = mJournal->calID(); | 197 | int id = mJournal->calID(); |
206 | if ( id > 1 ) { | 198 | |
207 | QString calname = KOPrefs::instance()->getCalendar( id )->mName; | 199 | QString calname = KOPrefs::instance()->getCalendar( id )->mName; |
208 | mTitleLabel->setText( KGlobal::locale()->formatDate(mDate,true) + " (" + calname +")"); | 200 | mTitleLabel->setText( " (" + calname +")"); |
209 | } else { | 201 | |
210 | mTitleLabel->setText(KGlobal::locale()->formatDate(mDate)); | ||
211 | } | ||
212 | mDirty = false; | 202 | mDirty = false; |
213 | } | 203 | } |
214 | 204 | ||
215 | Journal *JournalEntry::journal() const | 205 | Journal *JournalEntry::journal() const |
@@ -273,10 +263,9 @@ void JournalEntry::writeJournal() | |||
273 | mCalendar->addJournal(mJournal); | 263 | mCalendar->addJournal(mJournal); |
274 | } | 264 | } |
275 | 265 | ||
276 | mJournal->setDescription(mEditor->text()); | 266 | mJournal->setDescription(mEditor->text()); |
277 | //qDebug("tttt%s ", mEditor->text().latin1()); | 267 | mJournal->setSummary(mTitle->text()); |
278 | |||
279 | mDirty = false; | 268 | mDirty = false; |
280 | } | 269 | } |
281 | 270 | ||
282 | void JournalEntry::flushEntry() | 271 | void JournalEntry::flushEntry() |
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h index b0e9cc7..b37cabd 100644 --- a/korganizer/journalentry.h +++ b/korganizer/journalentry.h | |||
@@ -30,8 +30,9 @@ | |||
30 | #include <libkcal/calendar.h> | 30 | #include <libkcal/calendar.h> |
31 | 31 | ||
32 | class QLabel; | 32 | class QLabel; |
33 | class KTextEdit; | 33 | class KTextEdit; |
34 | class KLineEdit; | ||
34 | 35 | ||
35 | using namespace KCal; | 36 | using namespace KCal; |
36 | 37 | ||
37 | class JournalEntry : public QFrame { | 38 | class JournalEntry : public QFrame { |
@@ -47,9 +48,9 @@ class JournalEntry : public QFrame { | |||
47 | 48 | ||
48 | void clear(); | 49 | void clear(); |
49 | 50 | ||
50 | void flushEntry(); | 51 | void flushEntry(); |
51 | void setShowOnly() {showOnlyMode = true;} | 52 | void setShowOnly(); |
52 | QSize sizeHint() const; | 53 | QSize sizeHint() const; |
53 | 54 | ||
54 | protected slots: | 55 | protected slots: |
55 | void slotSaveTemplate(); | 56 | void slotSaveTemplate(); |
@@ -72,8 +73,9 @@ class JournalEntry : public QFrame { | |||
72 | Journal *mJournal; | 73 | Journal *mJournal; |
73 | QDate mDate; | 74 | QDate mDate; |
74 | void keyPressEvent ( QKeyEvent * ) ; | 75 | void keyPressEvent ( QKeyEvent * ) ; |
75 | QLabel *mTitleLabel; | 76 | QLabel *mTitleLabel; |
77 | KLineEdit * mTitle; | ||
76 | KTextEdit *mEditor; | 78 | KTextEdit *mEditor; |
77 | int heiHint; | 79 | int heiHint; |
78 | 80 | ||
79 | bool mDirty; | 81 | bool mDirty; |
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 3468657..067c34c 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp | |||
@@ -219,16 +219,25 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) | |||
219 | mToolTip.append( mToolTipText ); | 219 | mToolTip.append( mToolTipText ); |
220 | } | 220 | } |
221 | } | 221 | } |
222 | if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { | 222 | if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { |
223 | Journal *j = mCalendar->journal( mDate ); | 223 | QPtrList<Journal> j_list = mCalendar->journals4Date( mDate ); |
224 | if ( j ) { | 224 | Journal *j = j_list.first(); |
225 | QString mToolTipText = j->description().left(100); | 225 | while ( j ) { |
226 | if ( j->description().length() > 100 ) | 226 | QString mToolTipText; |
227 | mToolTipText += " ..."; | 227 | if ( !j->summary().isEmpty() ) { |
228 | mToolTipText = deTag( mToolTipText); | 228 | mToolTipText = j->summary().left(30); |
229 | if ( j->summary().length() > 30 ) | ||
230 | mToolTipText += " ..."; | ||
231 | } else { | ||
232 | mToolTipText = j->description().left(25); | ||
233 | if ( j->description().length() > 25 ) | ||
234 | mToolTipText += " ..."; | ||
235 | mToolTipText = deTag( mToolTipText); | ||
236 | } | ||
229 | mToolTipText = "<b>" + i18n("Journal: ") + "</b>"+ mToolTipText; | 237 | mToolTipText = "<b>" + i18n("Journal: ") + "</b>"+ mToolTipText; |
230 | mToolTip.append( mToolTipText ); | 238 | mToolTip.append( mToolTipText ); |
239 | j = j_list.next(); | ||
231 | } | 240 | } |
232 | } | 241 | } |
233 | return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); | 242 | return "<b>"+KGlobal::locale()->formatDate(days[tmp]) + "</b><br>" + mToolTip.join("<br>"); |
234 | } | 243 | } |
@@ -548,9 +557,11 @@ void KODayMatrix::updateViewTimed() | |||
548 | QString holiStr = mHolidays[i]; | 557 | QString holiStr = mHolidays[i]; |
549 | pDays.setBit(i); | 558 | pDays.setBit(i); |
550 | if ( !holiStr.isEmpty() ) | 559 | if ( !holiStr.isEmpty() ) |
551 | holiStr += "\n"; | 560 | holiStr += "\n"; |
552 | holiStr += i18n("Journal"); | 561 | holiStr += i18n("Journal: ")+todo->summary().left(25); |
562 | if ( todo->summary().length() > 25 ) | ||
563 | holiStr +="..."; | ||
553 | bDays.setBit(i); | 564 | bDays.setBit(i); |
554 | mHolidays[i] =holiStr ; | 565 | mHolidays[i] =holiStr ; |
555 | eDays.setBit(i); | 566 | eDays.setBit(i); |
556 | 567 | ||
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 6315827..dcbb99f 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -700,8 +700,11 @@ void KOEventViewer::appendJournal(Journal *jour, int mode ) | |||
700 | } | 700 | } |
701 | topLevelWidget()->setCaption("Journal Viewer"); | 701 | topLevelWidget()->setCaption("Journal Viewer"); |
702 | mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); | 702 | mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); |
703 | addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); | 703 | addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); |
704 | if (!jour->summary().isEmpty()) { | ||
705 | addTag("p",i18n(" Title: ") + deTag(jour->summary())); | ||
706 | } | ||
704 | if (!jour->description().isEmpty()) { | 707 | if (!jour->description().isEmpty()) { |
705 | addTag("p",deTag(jour->description())); | 708 | addTag("p",deTag(jour->description())); |
706 | } | 709 | } |
707 | setText(mText); | 710 | setText(mText); |
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index 9e354d3..4fc9013 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp | |||
@@ -26,12 +26,18 @@ | |||
26 | 26 | ||
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qscrollview.h> | 28 | #include <qscrollview.h> |
29 | #include <qpopupmenu.h> | 29 | #include <qpopupmenu.h> |
30 | #include <qhbox.h> | ||
31 | #include <qpushbutton.h> | ||
32 | #include <qlabel.h> | ||
33 | #include <qpushbutton.h> | ||
34 | #include <qapplication.h> | ||
30 | 35 | ||
31 | #include <klocale.h> | 36 | #include <klocale.h> |
32 | #include <kdebug.h> | 37 | #include <kdebug.h> |
33 | #include "koprefs.h" | 38 | #include "koprefs.h" |
39 | #include <kglobal.h> | ||
34 | 40 | ||
35 | #include <libkcal/calendar.h> | 41 | #include <libkcal/calendar.h> |
36 | 42 | ||
37 | #include "journalentry.h" | 43 | #include "journalentry.h" |
@@ -50,8 +56,23 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, | |||
50 | parWid = new QWidget( sv->viewport() ); | 56 | parWid = new QWidget( sv->viewport() ); |
51 | sv->addChild(parWid); | 57 | sv->addChild(parWid); |
52 | sv->setResizePolicy( QScrollView:: AutoOneFit ); | 58 | sv->setResizePolicy( QScrollView:: AutoOneFit ); |
53 | mTopLayout = new QVBoxLayout(parWid); | 59 | mTopLayout = new QVBoxLayout(parWid); |
60 | QHBox * vb = new QHBox ( parWid ); | ||
61 | QPushButton * newJournal = new QPushButton( vb ); | ||
62 | QIconSet icon; | ||
63 | if ( QApplication::desktop()->width() < 321 ) | ||
64 | icon = SmallIcon("ko16old"); | ||
65 | else | ||
66 | icon = SmallIcon("ko24old"); | ||
67 | newJournal->setIconSet (icon ) ; | ||
68 | int size = newJournal->sizeHint().height(); | ||
69 | newJournal->setFixedSize( size, size ); | ||
70 | mDateLabel = new QLabel ( vb ); | ||
71 | mTopLayout->addWidget( vb ); | ||
72 | mDateLabel->setMargin(2); | ||
73 | mDateLabel->setAlignment(AlignCenter); | ||
74 | connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) ); | ||
54 | getNewEntry(); | 75 | getNewEntry(); |
55 | } | 76 | } |
56 | 77 | ||
57 | KOJournalView::~KOJournalView() | 78 | KOJournalView::~KOJournalView() |
@@ -169,8 +190,9 @@ void KOJournalView::showList(QPtrList<Journal> jl) | |||
169 | 190 | ||
170 | void KOJournalView::showDates(const QDate &start, const QDate &) | 191 | void KOJournalView::showDates(const QDate &start, const QDate &) |
171 | { | 192 | { |
172 | mDate = start; | 193 | mDate = start; |
194 | mDateLabel-> setText(KGlobal::locale()->formatDate(mDate)); | ||
173 | QPtrList<Journal> jl = calendar()->journals4Date( start ); | 195 | QPtrList<Journal> jl = calendar()->journals4Date( start ); |
174 | showList( jl ); | 196 | showList( jl ); |
175 | } | 197 | } |
176 | 198 | ||
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h index 0437d95..331bdfa 100644 --- a/korganizer/kojournalview.h +++ b/korganizer/kojournalview.h | |||
@@ -26,8 +26,9 @@ | |||
26 | #include <korganizer/baseview.h> | 26 | #include <korganizer/baseview.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | 28 | ||
29 | class JournalEntry; | 29 | class JournalEntry; |
30 | class QLabel; | ||
30 | 31 | ||
31 | /** | 32 | /** |
32 | * This class provides a journal view. | 33 | * This class provides a journal view. |
33 | 34 | ||
@@ -69,8 +70,9 @@ class KOJournalView : public KOrg::BaseView | |||
69 | QPtrList<JournalEntry> jEntries; | 70 | QPtrList<JournalEntry> jEntries; |
70 | void keyPressEvent ( QKeyEvent * ) ; | 71 | void keyPressEvent ( QKeyEvent * ) ; |
71 | QBoxLayout *mTopLayout; | 72 | QBoxLayout *mTopLayout; |
72 | QWidget *parWid; | 73 | QWidget *parWid; |
74 | QLabel * mDateLabel; | ||
73 | QDate mDate; | 75 | QDate mDate; |
74 | 76 | ||
75 | }; | 77 | }; |
76 | 78 | ||
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 22d9ac0..0c1ac7a 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -214,12 +214,18 @@ bool ListItemVisitor::visit(Todo *t) | |||
214 | } | 214 | } |
215 | 215 | ||
216 | bool ListItemVisitor::visit(Journal * j) | 216 | bool ListItemVisitor::visit(Journal * j) |
217 | { | 217 | { |
218 | QString des = j->description().left(30); | 218 | |
219 | des = des.simplifyWhiteSpace (); | 219 | QString des; |
220 | des.replace (QRegExp ("\\n"),"" ); | 220 | if ( !j->summary().isEmpty() ) { |
221 | des.replace (QRegExp ("\\r"),"" ); | 221 | des = j->summary(); |
222 | } else { | ||
223 | des = j->description().left(30); | ||
224 | des = des.simplifyWhiteSpace (); | ||
225 | des.replace (QRegExp ("\\n"),"" ); | ||
226 | des.replace (QRegExp ("\\r"),"" ); | ||
227 | } | ||
222 | mItem->setText(0,i18n("Journal: ")+des.left(25)); | 228 | mItem->setText(0,i18n("Journal: ")+des.left(25)); |
223 | mItem->setText(1,j->dtStartDateStr()); | 229 | mItem->setText(1,j->dtStartDateStr()); |
224 | mItem->setText(2,"---"); | 230 | mItem->setText(2,"---"); |
225 | mItem->setText(3,"---"); | 231 | mItem->setText(3,"---"); |
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 0e9f64c..72359df 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp | |||
@@ -217,8 +217,11 @@ void SearchDialog::raiseAndSelect() | |||
217 | if ( ! mSearchJournal->isChecked() ) { | 217 | if ( ! mSearchJournal->isChecked() ) { |
218 | mSearchJournal->setChecked( true ); | 218 | mSearchJournal->setChecked( true ); |
219 | mSearchTodo->setChecked( false ); | 219 | mSearchTodo->setChecked( false ); |
220 | mSearchEvent->setChecked( false ); | 220 | mSearchEvent->setChecked( false ); |
221 | mSummaryCheck->setChecked( true ); | ||
222 | mDescriptionCheck->setChecked( true ); | ||
223 | |||
221 | } | 224 | } |
222 | } | 225 | } |
223 | else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { | 226 | else if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { |
224 | if ( ! mSearchTodo->isChecked() ) { | 227 | if ( ! mSearchTodo->isChecked() ) { |
@@ -549,20 +552,36 @@ void SearchDialog::search(const QRegExp &re) | |||
549 | 552 | ||
550 | for(journ=journals.first();journ;journ=journals.next()) { | 553 | for(journ=journals.first();journ;journ=journals.next()) { |
551 | if ( journ->dtStart().date() <= mEndDate->date() | 554 | if ( journ->dtStart().date() <= mEndDate->date() |
552 | &&journ->dtStart().date() >= mStartDate->date()) { | 555 | &&journ->dtStart().date() >= mStartDate->date()) { |
556 | if (mDescriptionCheck->isChecked()) { | ||
553 | #if QT_VERSION >= 0x030000 | 557 | #if QT_VERSION >= 0x030000 |
554 | if (re.search(journ->description()) != -1) | 558 | if (re.search(journ->description()) != -1) |
555 | #else | 559 | #else |
556 | if (re.match(journ->description()) != -1) | 560 | if (re.match(journ->description()) != -1) |
557 | #endif | 561 | #endif |
558 | { | 562 | { |
559 | if ( mSubItems->isChecked() ) | 563 | if ( mSubItems->isChecked() ) |
560 | mMatchedJournals.remove(journ); | 564 | mMatchedJournals.remove(journ); |
561 | else if (!mMatchedJournals.contains( journ )) | 565 | else if (!mMatchedJournals.contains( journ )) |
562 | mMatchedJournals.append(journ); | 566 | mMatchedJournals.append(journ); |
563 | continue; | 567 | continue; |
564 | } | 568 | } |
569 | } | ||
570 | if (mSummaryCheck->isChecked()) { | ||
571 | #if QT_VERSION >= 0x030000 | ||
572 | if (re.search(journ->summary()) != -1) | ||
573 | #else | ||
574 | if (re.match(journ->summary()) != -1) | ||
575 | #endif | ||
576 | { | ||
577 | if ( mSubItems->isChecked() ) | ||
578 | mMatchedJournals.remove(journ); | ||
579 | else if (!mMatchedJournals.contains( journ )) | ||
580 | mMatchedJournals.append(journ); | ||
581 | continue; | ||
582 | } | ||
583 | } | ||
565 | } | 584 | } |
566 | } | 585 | } |
567 | } | 586 | } |
568 | if ( mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() < 1 ) { | 587 | if ( mMatchedEvents.count() + mMatchedJournals.count() + mMatchedTodos.count() < 1 ) { |