summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-02 22:11:57 (UTC)
committer zautrix <zautrix>2005-07-02 22:11:57 (UTC)
commit3e2908a91251482d91404464aaf98ce902a319ce (patch) (side-by-side diff)
tree8e42916874c48ddaefb9c060b67b38376e63dd62
parent5cf73f798229641d23025af064e87fa88ab3de91 (diff)
downloadkdepimpi-3e2908a91251482d91404464aaf98ce902a319ce.zip
kdepimpi-3e2908a91251482d91404464aaf98ce902a319ce.tar.gz
kdepimpi-3e2908a91251482d91404464aaf98ce902a319ce.tar.bz2
added lm
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/kolistview.cpp29
2 files changed, 23 insertions, 8 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index bd946fd..727921a 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1489,5 +1489,5 @@
{ "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" },
{ "Edit","Edit" },
-{ "","" },
+{ "Last Modified","Zuletzt geändert" },
{ "","" },
{ "","" },
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index ea037a9..cec0476 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -141,7 +141,12 @@ bool ListItemVisitor::visit(Event *e)
mItem->setText(10,e->categoriesStr());
mItem->setText(11, KOPrefs::instance()->calName( e->calID() ));
+ mItem->setText(12, KGlobal::locale()->formatDateTime( e->lastModified(), true, true ));
QString key;
- QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time();
+ QDate d = e->lastModified().date();
+ QTime t = e->lastModified().time();
+ key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() );
+ mItem->setSortKey(12,key);
+ t = e->doesFloat() ? QTime(0,0) : e->dtStart().time();
key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute());
mItem->setSortKey(1,key);
@@ -196,10 +201,13 @@ bool ListItemVisitor::visit(Todo *t)
mItem->setText(10,t->categoriesStr());
mItem->setText(11, KOPrefs::instance()->calName( t->calID() ));
-
+ mItem->setText(12, KGlobal::locale()->formatDateTime( t->lastModified(), true, true ));
QString key;
- QDate d;
+ QDate d = t->lastModified().date();
+ QTime tm = t->lastModified().time();
+ key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() );
+ mItem->setSortKey(12,key);
if (t->hasDueDate()) {
d = t->dtDue().date();
- QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time();
+ tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time();
key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute());
mItem->setSortKey(7,key);
@@ -207,5 +215,5 @@ bool ListItemVisitor::visit(Todo *t)
if ( t->hasStartDate() ) {
d = t->dtStart().date();
- QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time();
+ tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time();
key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute());
mItem->setSortKey(1,key);
@@ -238,7 +246,12 @@ bool ListItemVisitor::visit(Journal * j)
mItem->setText(10,j->categoriesStr());
mItem->setText(11, KOPrefs::instance()->calName( j->calID() ));
+ mItem->setText(12, KGlobal::locale()->formatDateTime( j->lastModified(), true, true ));
QString key;
- QDate d = j->dtStart().date();
+ QDate d = j->lastModified().date();
+ QTime tm = j->lastModified().time();
+ key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() );
+ mItem->setSortKey(12,key);
+ d = j->dtStart().date();
key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
mItem->setSortKey(1,key);
@@ -268,4 +281,5 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
mListView->addColumn(i18n("Categories"));
mListView->addColumn(i18n("Calendar"));
+ mListView->addColumn(i18n("Last Modified"));
mListView->setColumnAlignment(0,AlignLeft);
@@ -281,8 +295,9 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
mListView->setColumnAlignment(10,AlignLeft);
mListView->setColumnAlignment(11,AlignLeft);
+ mListView->setColumnAlignment(12,AlignLeft);
mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this);
int iii = 0;
- for ( iii = 0; iii< 12 ; ++iii )
+ for ( iii = 0; iii< 13 ; ++iii )
mListView->setColumnWidthMode( iii, QListView::Manual );