summaryrefslogtreecommitdiffabout
path: root/korganizer/kowhatsnextview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kowhatsnextview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kowhatsnextview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index e8574a0..221debc 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -550,171 +550,171 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
} else {
if ( bDay ) {
if ( ev->isBirthday())
tempText += "<font color=\"#00B000\">" + i18n("Birthday") +":</font>";
else
tempText += "<font color=\"#00B0000\">" + i18n("Anniversary")+":</font>";
} else {
tempText += i18n("Allday:");
}
}
}
} else {
mTodos.append( ev );
tempText += i18n("ToDo:");
if (reply) {
tempText += " ";
if ( noc != cdt ) {
tempText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": ";
}
} else {
if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) {
// tempText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>";
QString dfs = KGlobal::locale()->dateFormatShort();
KGlobal::locale()->setDateFormatShort("%d.%b");
tempText +="<font color=\"#F00000\">" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "</font>";
KGlobal::locale()->setDateFormatShort(dfs);
} else {
if (!ev->doesFloat() )
if( ( (Todo*)ev)->dtDue() < cdt ) {
tempText +="<font color=\"#F00000\">" + ((Todo*)ev)->dtDueTimeStr() + "</font>";
} else
tempText +=((Todo*)ev)->dtDueTimeStr();
mTodos.append( ev );
}
}
}
tempText += "</b></td><td>";
bool needClose = false;
if ( ev->cancelled() ) {
tempText += "<font color=\"#F00000\">[c";
needClose =true;
}
- if ( ev->isAlarmEnabled() ) {
+ if ( ev->isAlarmEnabled() && ev->alarmEnabled()) {
if ( !needClose)
tempText +="[";
tempText += "a";
needClose =true;
}
if ( ev->description().length() > 0 ) {
if ( !needClose)
tempText +="[";
tempText += "i";
needClose =true;
}
if ( ev->recurrence()->doesRecur() ) {
if ( !needClose)
tempText +="[";
tempText += "r";
needClose =true;
}
if ( needClose ) {
tempText += "] ";
}
if ( ev->cancelled() )
tempText += "</font>";
tempText += "<a ";
if (ev->typeID() == eventID ) tempText += "href=\"event:";
if (ev->typeID() == todoID ) tempText += "href=\"todo:";
tempText += ev->uid() + "\">";
if ( ev->summary().length() > 0 )
tempText += ev->summary();
else
tempText += i18n("-no summary-");
if ( bDay ) {
noc = ev->getNextOccurence( cdt.addDays(-1), &ok );
if ( ok ) {
int years = 0;
if ( ev->typeID() == todoID ) {
years = noc.date().year() -((Todo*)ev)->dtDue().date().year();
} else
years = noc.date().year() - ev->dtStart().date().year();
tempText += i18n(" (%1 y.)"). arg( years );
}
}
tempText += "</a>";
if ( KOPrefs::instance()->mWNViewShowLocation )
if ( !ev->location().isEmpty() )
tempText += " ("+ev->location() +")";
if ( ev->relatedTo() && KOPrefs::instance()->mWNViewShowsParents)
tempText += " ["+ev->relatedTo()->summary() +"]";
tempText += "</td></tr>\n";
mText += tempText;
return true;
}
bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
{
if ( mTodos.find( ev ) != mTodos.end() ) return false;
mTodos.append( ev );
if ( !isSub )
mText += "<p>";
else
mText += "<li>";
mText += "[" +QString::number(ev->priority()) + "/" + QString::number(((Todo*)ev)->percentComplete())+"%] ";
mText += ind;
bool needClose = false;
if ( ev->cancelled() ) {
mText += "<font color=\"#F00000\">[c";
needClose =true;
}
- if ( ev->isAlarmEnabled() ) {
+ if ( ev->isAlarmEnabled() && ev->alarmEnabled() ) {
if ( !needClose)
mText +="[";
mText += "a";
needClose =true;
}
if ( ev->description().length() > 0 ) {
if ( !needClose)
mText +="[";
mText += "i";
needClose =true;
}
if ( ev->doesRecur() ) {
if ( !needClose)
mText +="[";
mText += "r";
needClose =true;
}
// if ( ev->recurrence()->doesRecur() ) {
// if ( !needClose)
// mText +="(";
// mText += "r";
// needClose =true;
// }
if ( needClose )
mText += "] ";
if ( ev->cancelled() )
mText += "</font>";
mText += "<a href=\"todo:" + ev->uid() + "\">";
if ( ev->summary().length() > 0 )
mText += ev->summary();
else
mText += i18n("-no summary-");
mText += "</a>";
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()->setDateFormatShort("%d.%b");
mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>";
KGlobal::locale()->setDateFormatShort(dfs);
}
if ( KOPrefs::instance()->mWNViewShowLocation )
if ( !ev->location().isEmpty() )
mText += " ("+ev->location() +")";