-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 29 |
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 @@ -1488,7 +1488,7 @@ { "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, { "\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 @@ -140,9 +140,14 @@ bool ListItemVisitor::visit(Event *e) mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); 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); @@ -195,18 +200,21 @@ bool ListItemVisitor::visit(Todo *t) mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); 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); } 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); } @@ -237,9 +245,14 @@ bool ListItemVisitor::visit(Journal * j) mItem->setText(9,"---"); 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); mItem->setSortKey(7,key); @@ -267,6 +280,7 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mListView->addColumn(i18n("Cancelled")); mListView->addColumn(i18n("Categories")); mListView->addColumn(i18n("Calendar")); + mListView->addColumn(i18n("Last Modified")); mListView->setColumnAlignment(0,AlignLeft); mListView->setColumnAlignment(1,AlignLeft); @@ -280,10 +294,11 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mListView->setColumnAlignment(9,AlignLeft); 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 ); QBoxLayout *layoutTop = new QVBoxLayout(this); |