-rw-r--r-- | korganizer/koeventviewer.cpp | 5 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 13 | ||||
-rw-r--r-- | korganizer/main.cpp | 2 |
3 files changed, 17 insertions, 3 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index e938e4e..1fcc977 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -492,24 +492,25 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
492 | } | 492 | } |
493 | 493 | ||
494 | } | 494 | } |
495 | void KOEventViewer::appendJournal(Journal *jour, int mode ) | 495 | void KOEventViewer::appendJournal(Journal *jour, int mode ) |
496 | { | 496 | { |
497 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 497 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
498 | if (mode == 0 ) | 498 | if (mode == 0 ) { |
499 | addTag("h2",i18n("Journal from: ")); | 499 | addTag("h2",i18n("Journal from: ")); |
500 | } | ||
500 | else { | 501 | else { |
501 | if ( mode == 1 ) { | 502 | if ( mode == 1 ) { |
502 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); | 503 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); |
503 | } else { | 504 | } else { |
504 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); | 505 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); |
505 | } | 506 | } |
506 | addTag("h3",i18n( "Last modified " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); | ||
507 | } | 507 | } |
508 | topLevelWidget()->setCaption("Journal Viewer"); | 508 | topLevelWidget()->setCaption("Journal Viewer"); |
509 | mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); | 509 | mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); |
510 | addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); | ||
510 | if (!jour->description().isEmpty()) { | 511 | if (!jour->description().isEmpty()) { |
511 | addTag("p",jour->description()); | 512 | addTag("p",jour->description()); |
512 | } | 513 | } |
513 | setText(mText); | 514 | setText(mText); |
514 | } | 515 | } |
515 | 516 | ||
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 9a3ba73..bafd349 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -29,12 +29,13 @@ | |||
29 | #include <qprogressbar.h> | 29 | #include <qprogressbar.h> |
30 | #include <qfileinfo.h> | 30 | #include <qfileinfo.h> |
31 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
32 | #include <qdialog.h> | 32 | #include <qdialog.h> |
33 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
34 | #include <qdir.h> | 34 | #include <qdir.h> |
35 | #include <qregexp.h> | ||
35 | 36 | ||
36 | #include <klocale.h> | 37 | #include <klocale.h> |
37 | #include <kdebug.h> | 38 | #include <kdebug.h> |
38 | #include <kiconloader.h> | 39 | #include <kiconloader.h> |
39 | #include <kglobal.h> | 40 | #include <kglobal.h> |
40 | 41 | ||
@@ -162,22 +163,27 @@ bool ListItemVisitor::visit(Todo *t) | |||
162 | } | 163 | } |
163 | return true; | 164 | return true; |
164 | } | 165 | } |
165 | 166 | ||
166 | bool ListItemVisitor::visit(Journal * j) | 167 | bool ListItemVisitor::visit(Journal * j) |
167 | { | 168 | { |
168 | mItem->setText(0,i18n("Journal")); | 169 | QString des = j->description().left(50); |
170 | des = des.simplifyWhiteSpace (); | ||
171 | des.replace (QRegExp ("\\n"),"" ); | ||
172 | des.replace (QRegExp ("\\r"),"" ); | ||
173 | mItem->setText(0,i18n("Journal")+": "+des.left(25)); | ||
169 | mItem->setText(1,j->dtStartDateStr()); | 174 | mItem->setText(1,j->dtStartDateStr()); |
170 | mItem->setText(2,"---"); | 175 | mItem->setText(2,"---"); |
171 | mItem->setText(3,"---"); | 176 | mItem->setText(3,"---"); |
172 | mItem->setText(4,"---"); | 177 | mItem->setText(4,"---"); |
173 | mItem->setText(5,"---"); | 178 | mItem->setText(5,"---"); |
174 | mItem->setText(6,"---"); | 179 | mItem->setText(6,"---"); |
175 | mItem->setText(7,j->dtStartDateStr()); | 180 | mItem->setText(7,j->dtStartDateStr()); |
176 | mItem->setText(8,"---"); | 181 | mItem->setText(8,"---"); |
177 | mItem->setText(9,"---"); | 182 | mItem->setText(9,"---"); |
183 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); | ||
178 | 184 | ||
179 | QString key; | 185 | QString key; |
180 | QDate d = j->dtStart().date(); | 186 | QDate d = j->dtStart().date(); |
181 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); | 187 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); |
182 | mItem->setSortKey(1,key); | 188 | mItem->setSortKey(1,key); |
183 | mItem->setSortKey(7,key); | 189 | mItem->setSortKey(7,key); |
@@ -686,17 +692,22 @@ void KOListView::setStartDate(const QDate &start) | |||
686 | 692 | ||
687 | void KOListView::showDates(const QDate &start, const QDate &end) | 693 | void KOListView::showDates(const QDate &start, const QDate &end) |
688 | { | 694 | { |
689 | clear(); | 695 | clear(); |
690 | mStartDate = start; | 696 | mStartDate = start; |
691 | QDate date = start; | 697 | QDate date = start; |
698 | QPtrList<Journal> j_list; | ||
692 | while( date <= end ) { | 699 | while( date <= end ) { |
693 | addEvents(calendar()->events(date)); | 700 | addEvents(calendar()->events(date)); |
694 | addTodos(calendar()->todos(date)); | 701 | addTodos(calendar()->todos(date)); |
702 | Journal* jo = calendar()->journal(date); | ||
703 | if ( jo ) | ||
704 | j_list.append( jo ); | ||
695 | date = date.addDays( 1 ); | 705 | date = date.addDays( 1 ); |
696 | } | 706 | } |
707 | addJournals(j_list); | ||
697 | emit incidenceSelected( 0 ); | 708 | emit incidenceSelected( 0 ); |
698 | updateView(); | 709 | updateView(); |
699 | 710 | ||
700 | } | 711 | } |
701 | 712 | ||
702 | void KOListView::addEvents(QPtrList<Event> eventList) | 713 | void KOListView::addEvents(QPtrList<Event> eventList) |
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index c8a55d2..ca53828 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp | |||
@@ -9,12 +9,13 @@ | |||
9 | #include <qapplication.h> | 9 | #include <qapplication.h> |
10 | #include <qstring.h> | 10 | #include <qstring.h> |
11 | #include <qwindowsstyle.h> | 11 | #include <qwindowsstyle.h> |
12 | #include <qplatinumstyle.h> | 12 | #include <qplatinumstyle.h> |
13 | #include <qsgistyle.h> | 13 | #include <qsgistyle.h> |
14 | #endif | 14 | #endif |
15 | #include <qtextcodec.h> | ||
15 | 16 | ||
16 | #include <qdir.h> | 17 | #include <qdir.h> |
17 | #include <kstandarddirs.h> | 18 | #include <kstandarddirs.h> |
18 | #include <kglobal.h> | 19 | #include <kglobal.h> |
19 | #include <stdio.h> | 20 | #include <stdio.h> |
20 | #include "mainwindow.h" | 21 | #include "mainwindow.h" |
@@ -94,11 +95,12 @@ int main( int argc, char **argv ) | |||
94 | if ( argc > 2 ) | 95 | if ( argc > 2 ) |
95 | command += argv[2]; | 96 | command += argv[2]; |
96 | qApp->processEvents(); | 97 | qApp->processEvents(); |
97 | m.recieve(command, QByteArray() ); | 98 | m.recieve(command, QByteArray() ); |
98 | 99 | ||
99 | } | 100 | } |
101 | |||
100 | a.exec(); | 102 | a.exec(); |
101 | 103 | ||
102 | } | 104 | } |
103 | qDebug("KO: Bye! "); | 105 | qDebug("KO: Bye! "); |
104 | } | 106 | } |