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) (unidiff)
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 @@
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>
@@ -165,7 +166,11 @@ bool ListItemVisitor::visit(Todo *t)
165 166
166bool ListItemVisitor::visit(Journal * j) 167bool 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,"---");
@@ -175,6 +180,7 @@ bool ListItemVisitor::visit(Journal * j)
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();
@@ -689,11 +695,16 @@ void KOListView::showDates(const QDate &start, const QDate &end)
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