author | zautrix <zautrix> | 2004-10-21 22:20:39 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-21 22:20:39 (UTC) |
commit | d6f9bd535e8cabe653bdff329500f9153e5e11fb (patch) (side-by-side diff) | |
tree | 6f83c692713c41896a165e399f259a744f125e5c /korganizer | |
parent | bb235c5a639b914574e1e247d2de6e479517585f (diff) | |
download | kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.zip kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.tar.gz kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.tar.bz2 |
small fixes
-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 @@ -497,4 +497,5 @@ void KOEventViewer::appendJournal(Journal *jour, int mode ) bool shortDate = KOPrefs::instance()->mShortDateInViewer; - if (mode == 0 ) + if (mode == 0 ) { addTag("h2",i18n("Journal from: ")); + } else { @@ -505,3 +506,2 @@ void KOEventViewer::appendJournal(Journal *jour, int mode ) } - addTag("h3",i18n( "Last modified " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); } @@ -509,2 +509,3 @@ void KOEventViewer::appendJournal(Journal *jour, int mode ) mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); + addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); if (!jour->description().isEmpty()) { diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 9a3ba73..bafd349 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -34,2 +34,3 @@ #include <qdir.h> +#include <qregexp.h> @@ -167,3 +168,7 @@ bool ListItemVisitor::visit(Journal * j) { - mItem->setText(0,i18n("Journal")); + QString des = j->description().left(50); + des = des.simplifyWhiteSpace (); + des.replace (QRegExp ("\\n"),"" ); + des.replace (QRegExp ("\\r"),"" ); + mItem->setText(0,i18n("Journal")+": "+des.left(25)); mItem->setText(1,j->dtStartDateStr()); @@ -177,2 +182,3 @@ bool ListItemVisitor::visit(Journal * j) mItem->setText(9,"---"); + mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); @@ -691,2 +697,3 @@ void KOListView::showDates(const QDate &start, const QDate &end) QDate date = start; + QPtrList<Journal> j_list; while( date <= end ) { @@ -694,4 +701,8 @@ void KOListView::showDates(const QDate &start, const QDate &end) addTodos(calendar()->todos(date)); + Journal* jo = calendar()->journal(date); + if ( jo ) + j_list.append( jo ); date = date.addDays( 1 ); } + addJournals(j_list); emit incidenceSelected( 0 ); diff --git a/korganizer/main.cpp b/korganizer/main.cpp index c8a55d2..ca53828 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp @@ -14,2 +14,3 @@ #endif +#include <qtextcodec.h> @@ -99,2 +100,3 @@ int main( int argc, char **argv ) } + a.exec(); |