summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp5
-rw-r--r--korganizer/kolistview.cpp13
-rw-r--r--korganizer/main.cpp2
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
@@ -495,18 +495,19 @@ 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());
}
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();
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index c8a55d2..ca53828 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -12,6 +12,7 @@
#include <qplatinumstyle.h>
#include <qsgistyle.h>
#endif
+#include <qtextcodec.h>
#include <qdir.h>
#include <kstandarddirs.h>
@@ -97,6 +98,7 @@ int main( int argc, char **argv )
m.recieve(command, QByteArray() );
}
+
a.exec();
}