summaryrefslogtreecommitdiffabout
path: root/korganizer
authorulf69 <ulf69>2004-07-09 08:02:25 (UTC)
committer ulf69 <ulf69>2004-07-09 08:02:25 (UTC)
commitd91c533ffc42d7bf48fa1326754894b2c30b6831 (patch) (side-by-side diff)
treeba1eada897522030f17ccdf1afd4d4d96a65464e /korganizer
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') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/kowhatsnextview.cpp10
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()
mNavigator->selectPreviousMonth();
}
void CalendarView::writeLocale()
{
KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime );
KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday );
- KGlobal::locale()->setIntDateFormat( KOPrefs::instance()->mPreferredDate );
+ KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate );
KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage );
QString dummy = KOPrefs::instance()->mUserDateFormatLong;
KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
dummy = KOPrefs::instance()->mUserDateFormatShort;
KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
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 )
} else {
mTodos.append( ev );
mText += i18n("ToDo:");
if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) {
// mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>";
QString dfs = KGlobal::locale()->dateFormatShort();
- KGlobal::locale()->setIntDateFormat( 3 );
KGlobal::locale()->setDateFormatShort("%d.%b");
- mText +="<font color=\"#F00000\">" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true) + "</font>";
-
+ mText +="<font color=\"#F00000\">" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "</font>";
KGlobal::locale()->setDateFormatShort(dfs);
- KGlobal::locale()->setIntDateFormat( KOPrefs::instance()->mPreferredDate );
} else {
if (!ev->doesFloat() )
if( ( (Todo*)ev)->dtDue() < cdt ) {
mText +="<font color=\"#F00000\">" + ((Todo*)ev)->dtDueTimeStr() + "</font>";
@@ -564,18 +561,15 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
if ( ((Todo*)ev)->hasDueDate () ) {
QString year = "";
int ye = ((Todo*)ev)->dtDue().date().year();
if ( QDateTime::currentDateTime().date().year() != ye )
year = QString::number( ye );
QString dfs = KGlobal::locale()->dateFormatShort();
- KGlobal::locale()->setIntDateFormat( 3 );
KGlobal::locale()->setDateFormatShort("%d.%b");
- mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true) + "."+ year +"]</font>";
-
+ mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>";
KGlobal::locale()->setDateFormatShort(dfs);
- KGlobal::locale()->setIntDateFormat( KOPrefs::instance()->mPreferredDate );
}
if ( KOPrefs::instance()->mWNViewShowLocation )
if ( !ev->location().isEmpty() )
mText += " ("+ev->location() +")";
if ( !isSub ) {
if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents)