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 @@ -494,20 +494,21 @@ void KOEventViewer::formatAttendees(Incidence *event) } void KOEventViewer::appendJournal(Journal *jour, int mode ) { bool shortDate = KOPrefs::instance()->mShortDateInViewer; - if (mode == 0 ) + if (mode == 0 ) { addTag("h2",i18n("Journal from: ")); + } else { if ( mode == 1 ) { addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); } else { addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); } - addTag("h3",i18n( "Last modified " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); } topLevelWidget()->setCaption("Journal Viewer"); 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()) { addTag("p",jour->description()); } setText(mText); diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 9a3ba73..bafd349 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -31,8 +31,9 @@ #include <qmessagebox.h> #include <qdialog.h> #include <qtextstream.h> #include <qdir.h> +#include <qregexp.h> #include <klocale.h> #include <kdebug.h> #include <kiconloader.h> @@ -164,9 +165,13 @@ 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,"---"); mItem->setText(4,"---"); @@ -174,8 +179,9 @@ bool ListItemVisitor::visit(Journal * j) mItem->setText(6,"---"); 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(); key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); @@ -688,13 +694,18 @@ 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(); } diff --git a/korganizer/main.cpp b/korganizer/main.cpp index c8a55d2..ca53828 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp @@ -11,8 +11,9 @@ #include <qwindowsstyle.h> #include <qplatinumstyle.h> #include <qsgistyle.h> #endif +#include <qtextcodec.h> #include <qdir.h> #include <kstandarddirs.h> #include <kglobal.h> @@ -96,8 +97,9 @@ int main( int argc, char **argv ) qApp->processEvents(); m.recieve(command, QByteArray() ); } + a.exec(); } qDebug("KO: Bye! "); |