author | zautrix <zautrix> | 2005-04-15 09:18:49 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-15 09:18:49 (UTC) |
commit | ab47475f1b03a8c82f9b0388549a2618743f2a69 (patch) (side-by-side diff) | |
tree | 381622b3ceb94daf771a2697ee10f0cd6572e947 /korganizer | |
parent | acb5803cdda97ef1369388eb15eb669e2835c06a (diff) | |
download | kdepimpi-ab47475f1b03a8c82f9b0388549a2618743f2a69.zip kdepimpi-ab47475f1b03a8c82f9b0388549a2618743f2a69.tar.gz kdepimpi-ab47475f1b03a8c82f9b0388549a2618743f2a69.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/koeventviewer.cpp | 94 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 5 |
2 files changed, 59 insertions, 40 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index bdad248..fefc778 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -308,17 +308,13 @@ void KOEventViewer::appendEvent(Event *event, int mode ) mText +="<font color=\"#B00000\">"; addTag("i",i18n("This event has been cancelled!")); mText.append("<br>"); mText += "</font>"; mMailSubject += i18n("(cancelled)"); } - if (!event->location().isEmpty()) { - addTag("b",i18n("Location: ")); - mText.append(deTag(event->location())+"<br>"); - mMailSubject += i18n(" at ") + event->location(); - } + if (event->doesFloat()) { if (event->isMultiDay()) { mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") .arg(event->dtStartDateStr(shortDate)) .arg(event->dtEndDateStr(shortDate))); } else { @@ -328,20 +324,24 @@ void KOEventViewer::appendEvent(Event *event, int mode ) if (event->isMultiDay()) { mText.append(i18n("<p><b>From:</b> %1</p> ") .arg(event->dtStartStr( shortDate))); mText.append(i18n("<p><b>To:</b> %1</p>") .arg(event->dtEndStr(shortDate))); } else { - mText.append(i18n("<p><b>On:</b> %1</p> ") - .arg(event->dtStartDateStr( shortDate ))); mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") .arg(event->dtStartTimeStr()) .arg(event->dtEndTimeStr())); + mText.append(i18n("<p><b>On:</b> %1</p> ") + .arg(event->dtStartDateStr( shortDate ))); } } - + if (!event->location().isEmpty()) { + addTag("b",i18n("Location: ")); + mText.append(deTag(event->location())+"<br>"); + mMailSubject += i18n(" at ") + event->location(); + } if (event->recurrence()->doesRecur()) { QString recurText = event->recurrence()->recurrenceText(); addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); bool ok; QDate start = QDate::currentDate(); @@ -377,32 +377,41 @@ void KOEventViewer::appendEvent(Event *event, int mode ) } addTag("b",i18n("Access: ")); mText.append(event->secrecyStr()+"<br>"); - if ( KOPrefs::instance()->mEVshowDetails ) { - if (!event->description().isEmpty()) { - addTag("p",i18n("<b>Details: </b>")); - addTag("p",deTag(event->description())); - } - } + formatCategories(event); formatReadOnly(event); formatAttendees(event); if ( KOPrefs::instance()->mEVshowCreated ) { +#ifdef DESKTOP_VERSION + addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); +#else addTag("p",i18n("<b>Created: ") +" </b>"); addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); +#endif } if ( KOPrefs::instance()->mEVshowChanged ) { +#ifdef DESKTOP_VERSION + addTag("p",i18n("<b>Last modified: ") +" </b>" + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); +#else addTag("p",i18n("<b>Last modified: ") +" </b>"); addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); +#endif + } + if ( KOPrefs::instance()->mEVshowDetails ) { + if (!event->description().isEmpty()) { + addTag("p",i18n("<b>Details: </b>")); + addTag("p",deTag(event->description())); + } } setText(mText); //QWhatsThis::add(this,mText); } @@ -446,17 +455,13 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) addTag("i",i18n("This todo has been cancelled!")); mText.append("<br>"); mText += "</font>"; mMailSubject += i18n("(cancelled)"); } - if (!event->location().isEmpty()) { - addTag("b",i18n("Location: ")); - mText.append(deTag(event->location())+"<br>"); - mMailSubject += i18n(" at ") + event->location(); - } + if (event->recurrence()->doesRecur()) { QString recurText = event->recurrence()->recurrenceText(); addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); @@ -465,60 +470,73 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); } if (event->hasDueDate()) { mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); mMailSubject += i18n(" - " )+event->dtDueStr( true ); } - + if (!event->location().isEmpty()) { + addTag("b",i18n("Location: ")); + mText.append(deTag(event->location())+"<br>"); + mMailSubject += i18n(" at ") + event->location(); + } + mText.append(i18n("<p><b>Priority:</b> %2</p>") + .arg(QString::number(event->priority()))); if (event->isAlarmEnabled()) { Alarm *alarm =event->alarms().first() ; QDateTime t = alarm->time(); QString s =i18n("( %1 before )").arg( alarm->offsetText() ); addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); //addTag("p",s); } addTag("b",i18n("Access: ")); mText.append(event->secrecyStr()+"<br>"); - if ( KOPrefs::instance()->mEVshowDetails ) { - if (!event->description().isEmpty()) { - addTag("p",i18n("<b>Details: </b>")); - addTag("p",deTag(event->description())); - } - } formatCategories(event); - mText.append(i18n("<p><b>Priority:</b> %2</p>") - .arg(QString::number(event->priority()))); - formatReadOnly(event); formatAttendees(event); + + if ( KOPrefs::instance()->mEVshowCreated ) { +#ifdef DESKTOP_VERSION + addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); +#else + addTag("p",i18n("<b>Created: ") +" </b>"); + addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); +#endif + + } + if ( KOPrefs::instance()->mEVshowChanged ) { +#ifdef DESKTOP_VERSION + addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); +#else + addTag("p",i18n("<b>Last modified: ") +" </b>"); + addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); +#endif + + } if ( event->relatedTo() ) { addTag("b",i18n("Parent todo:<br>")); mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); } QPtrList<Incidence> Relations = event->relations(); Incidence *to; if ( Relations.first() ) addTag("b",i18n("Sub todos:<br>")); for (to=Relations.first();to;to=Relations.next()) { mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); } - if ( KOPrefs::instance()->mEVshowCreated ) { - addTag("p",i18n("<b>Created: ") +" </b>"); - addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); - - } - if ( KOPrefs::instance()->mEVshowChanged ) { - addTag("p",i18n("<b>Last modified: ") +" </b>"); - addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); - + + if ( KOPrefs::instance()->mEVshowDetails ) { + if (!event->description().isEmpty()) { + addTag("p",i18n("<b>Details: </b>")); + addTag("p",deTag(event->description())); + } } setText(mText); } void KOEventViewer::formatCategories(Incidence *event) { diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 65d6acf..b175f9a 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -639,13 +639,13 @@ void MonthViewCell::startUpdateCell() #endif } int MonthViewCell::insertEvent(Event *event) { bool useToolTips = true; -#ifndef DEKSTOP_VERSION +#ifndef DESKTOP_VERSION useToolTips = false; #endif QString mToolTipText; setFocusPolicy(WheelFocus); if ( !(event->doesRecur() == Recurrence::rNone) ) { if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) @@ -771,14 +771,15 @@ int MonthViewCell::insertEvent(Event *event) break; } ++pos; } insertItem( item ,pos); } - if ( useToolTips ) + if ( useToolTips ) { mToolTip.append( mToolTipText ); + } return mdayCount; } void MonthViewCell::insertTodo(Todo *todo) { setFocusPolicy(WheelFocus); QString text; |