summaryrefslogtreecommitdiffabout
path: root/korganizer/kolistview.cpp
authorzautrix <zautrix>2004-10-21 22:20:39 (UTC)
committer zautrix <zautrix>2004-10-21 22:20:39 (UTC)
commitd6f9bd535e8cabe653bdff329500f9153e5e11fb (patch) (side-by-side diff)
tree6f83c692713c41896a165e399f259a744f125e5c /korganizer/kolistview.cpp
parentbb235c5a639b914574e1e247d2de6e479517585f (diff)
downloadkdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.zip
kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.tar.gz
kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.tar.bz2
small fixes
Diffstat (limited to 'korganizer/kolistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kolistview.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 9a3ba73..bafd349 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -32,6 +32,7 @@
#include <qdialog.h>
#include <qtextstream.h>
#include <qdir.h>
+#include <qregexp.h>
#include <klocale.h>
#include <kdebug.h>
@@ -165,7 +166,11 @@ bool ListItemVisitor::visit(Todo *t)
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());
mItem->setText(2,"---");
mItem->setText(3,"---");
@@ -175,6 +180,7 @@ bool ListItemVisitor::visit(Journal * j)
mItem->setText(7,j->dtStartDateStr());
mItem->setText(8,"---");
mItem->setText(9,"---");
+ mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) );
QString key;
QDate d = j->dtStart().date();
@@ -689,11 +695,16 @@ void KOListView::showDates(const QDate &start, const QDate &end)
clear();
mStartDate = start;
QDate date = start;
+ QPtrList<Journal> j_list;
while( date <= end ) {
addEvents(calendar()->events(date));
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 );
updateView();