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 | |||
@@ -1767,25 +1767,25 @@ void CalendarView::goNextMonth() | |||
1767 | { | 1767 | { |
1768 | mNavigator->selectNextMonth(); | 1768 | mNavigator->selectNextMonth(); |
1769 | } | 1769 | } |
1770 | 1770 | ||
1771 | void CalendarView::goPreviousMonth() | 1771 | void CalendarView::goPreviousMonth() |
1772 | { | 1772 | { |
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, |
1786 | KOPrefs::instance()->mDaylightsavingStart, | 1786 | KOPrefs::instance()->mDaylightsavingStart, |
1787 | KOPrefs::instance()->mDaylightsavingEnd ); | 1787 | KOPrefs::instance()->mDaylightsavingEnd ); |
1788 | KGlobal::locale()->setTimezone( KOPrefs::instance()->mTimeZoneId ); | 1788 | KGlobal::locale()->setTimezone( KOPrefs::instance()->mTimeZoneId ); |
1789 | } | 1789 | } |
1790 | void CalendarView::updateConfig() | 1790 | void CalendarView::updateConfig() |
1791 | { | 1791 | { |
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 0547a2e..b2001ec 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp | |||
@@ -441,30 +441,27 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
441 | } | 441 | } |
442 | 442 | ||
443 | } else { | 443 | } else { |
444 | mText += i18n("Allday:"); | 444 | mText += i18n("Allday:"); |
445 | 445 | ||
446 | } | 446 | } |
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 | ||
465 | } else | 462 | } else |
466 | mText +=((Todo*)ev)->dtDueTimeStr(); | 463 | mText +=((Todo*)ev)->dtDueTimeStr(); |
467 | mTodos.append( ev ); | 464 | mTodos.append( ev ); |
468 | } | 465 | } |
469 | } | 466 | } |
470 | mText += "</b></td><td>"; | 467 | mText += "</b></td><td>"; |
@@ -558,30 +555,27 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) | |||
558 | mText += "] "; | 555 | mText += "] "; |
559 | if ( ev->cancelled() ) | 556 | if ( ev->cancelled() ) |
560 | mText += "</font>"; | 557 | mText += "</font>"; |
561 | mText += "<a href=\"todo:" + ev->uid() + "\">"; | 558 | mText += "<a href=\"todo:" + ev->uid() + "\">"; |
562 | mText += ev->summary(); | 559 | mText += ev->summary(); |
563 | mText += "</a>"; | 560 | mText += "</a>"; |
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) |
582 | mText += " ["+ev->relatedTo()->summary() +"]"; | 576 | mText += " ["+ev->relatedTo()->summary() +"]"; |
583 | mText += "</p>\n"; | 577 | mText += "</p>\n"; |
584 | } | 578 | } |
585 | else { | 579 | else { |
586 | ind += "-"; | 580 | ind += "-"; |
587 | mText += "</li>\n"; | 581 | mText += "</li>\n"; |