author | ulf69 <ulf69> | 2004-07-09 08:02:25 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-07-09 08:02:25 (UTC) |
commit | d91c533ffc42d7bf48fa1326754894b2c30b6831 (patch) (unidiff) | |
tree | ba1eada897522030f17ccdf1afd4d4d96a65464e /korganizer | |
parent | 82dabc14cc446fb8c0486cd4c32064e3866d2be9 (diff) | |
download | kdepimpi-d91c533ffc42d7bf48fa1326754894b2c30b6831.zip kdepimpi-d91c533ffc42d7bf48fa1326754894b2c30b6831.tar.gz kdepimpi-d91c533ffc42d7bf48fa1326754894b2c30b6831.tar.bz2 |
changed the IntDateFormat from type int to enum, for easier categorization
-rw-r--r-- | korganizer/calendarview.cpp | 2 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 10 |
2 files changed, 3 insertions, 9 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index c3c3d47..58b3d70 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1773,13 +1773,13 @@ void CalendarView::goPreviousMonth() | |||
1773 | mNavigator->selectPreviousMonth(); | 1773 | mNavigator->selectPreviousMonth(); |
1774 | } | 1774 | } |
1775 | void CalendarView::writeLocale() | 1775 | void CalendarView::writeLocale() |
1776 | { | 1776 | { |
1777 | KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); | 1777 | KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); |
1778 | KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday ); | 1778 | KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday ); |
1779 | KGlobal::locale()->setIntDateFormat( KOPrefs::instance()->mPreferredDate ); | 1779 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate ); |
1780 | KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage ); | 1780 | KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage ); |
1781 | QString dummy = KOPrefs::instance()->mUserDateFormatLong; | 1781 | QString dummy = KOPrefs::instance()->mUserDateFormatLong; |
1782 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | 1782 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); |
1783 | dummy = KOPrefs::instance()->mUserDateFormatShort; | 1783 | dummy = KOPrefs::instance()->mUserDateFormatShort; |
1784 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | 1784 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); |
1785 | KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving, | 1785 | KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving, |
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) |