summaryrefslogtreecommitdiffabout
path: root/korganizer/kowhatsnextview.cpp
authorulf69 <ulf69>2004-07-09 08:02:25 (UTC)
committer ulf69 <ulf69>2004-07-09 08:02:25 (UTC)
commitd91c533ffc42d7bf48fa1326754894b2c30b6831 (patch) (unidiff)
treeba1eada897522030f17ccdf1afd4d4d96a65464e /korganizer/kowhatsnextview.cpp
parent82dabc14cc446fb8c0486cd4c32064e3866d2be9 (diff)
downloadkdepimpi-d91c533ffc42d7bf48fa1326754894b2c30b6831.zip
kdepimpi-d91c533ffc42d7bf48fa1326754894b2c30b6831.tar.gz
kdepimpi-d91c533ffc42d7bf48fa1326754894b2c30b6831.tar.bz2
changed the IntDateFormat from type int to enum, for easier categorization
Diffstat (limited to 'korganizer/kowhatsnextview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kowhatsnextview.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 0547a2e..b2001ec 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -447,18 +447,15 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed )
447 } else { 447 } else {
448 mTodos.append( ev ); 448 mTodos.append( ev );
449 mText += i18n("ToDo:"); 449 mText += i18n("ToDo:");
450 if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) { 450 if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) {
451 // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; 451 // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>";
452 QString dfs = KGlobal::locale()->dateFormatShort(); 452 QString dfs = KGlobal::locale()->dateFormatShort();
453 KGlobal::locale()->setIntDateFormat( 3 );
454 KGlobal::locale()->setDateFormatShort("%d.%b"); 453 KGlobal::locale()->setDateFormatShort("%d.%b");
455 mText +="<font color=\"#F00000\">" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true) + "</font>"; 454 mText +="<font color=\"#F00000\">" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "</font>";
456
457 KGlobal::locale()->setDateFormatShort(dfs); 455 KGlobal::locale()->setDateFormatShort(dfs);
458 KGlobal::locale()->setIntDateFormat( KOPrefs::instance()->mPreferredDate );
459 } else { 456 } else {
460 if (!ev->doesFloat() ) 457 if (!ev->doesFloat() )
461 if( ( (Todo*)ev)->dtDue() < cdt ) { 458 if( ( (Todo*)ev)->dtDue() < cdt ) {
462 mText +="<font color=\"#F00000\">" + ((Todo*)ev)->dtDueTimeStr() + "</font>"; 459 mText +="<font color=\"#F00000\">" + ((Todo*)ev)->dtDueTimeStr() + "</font>";
463 460
464 461
@@ -564,18 +561,15 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
564 if ( ((Todo*)ev)->hasDueDate () ) { 561 if ( ((Todo*)ev)->hasDueDate () ) {
565 QString year = ""; 562 QString year = "";
566 int ye = ((Todo*)ev)->dtDue().date().year(); 563 int ye = ((Todo*)ev)->dtDue().date().year();
567 if ( QDateTime::currentDateTime().date().year() != ye ) 564 if ( QDateTime::currentDateTime().date().year() != ye )
568 year = QString::number( ye ); 565 year = QString::number( ye );
569 QString dfs = KGlobal::locale()->dateFormatShort(); 566 QString dfs = KGlobal::locale()->dateFormatShort();
570 KGlobal::locale()->setIntDateFormat( 3 );
571 KGlobal::locale()->setDateFormatShort("%d.%b"); 567 KGlobal::locale()->setDateFormatShort("%d.%b");
572 mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true) + "."+ year +"]</font>"; 568 mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>";
573
574 KGlobal::locale()->setDateFormatShort(dfs); 569 KGlobal::locale()->setDateFormatShort(dfs);
575 KGlobal::locale()->setIntDateFormat( KOPrefs::instance()->mPreferredDate );
576 } 570 }
577 if ( KOPrefs::instance()->mWNViewShowLocation ) 571 if ( KOPrefs::instance()->mWNViewShowLocation )
578 if ( !ev->location().isEmpty() ) 572 if ( !ev->location().isEmpty() )
579 mText += " ("+ev->location() +")"; 573 mText += " ("+ev->location() +")";
580 if ( !isSub ) { 574 if ( !isSub ) {
581 if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents) 575 if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents)