author | zautrix <zautrix> | 2005-02-09 13:22:06 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-09 13:22:06 (UTC) |
commit | c3dd5bfd446b893a8b39ddec425a6cf8deff2261 (patch) (side-by-side diff) | |
tree | d0dd74c17fd6101da1d6c403c85924c58bc1ac9b /korganizer | |
parent | 940cdd0fd1349e7f8e53adff0595c1d946322ef1 (diff) | |
download | kdepimpi-c3dd5bfd446b893a8b39ddec425a6cf8deff2261.zip kdepimpi-c3dd5bfd446b893a8b39ddec425a6cf8deff2261.tar.gz kdepimpi-c3dd5bfd446b893a8b39ddec425a6cf8deff2261.tar.bz2 |
fixes
-rw-r--r-- | korganizer/koeditorgeneralevent.cpp | 8 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 2 | ||||
-rw-r--r-- | korganizer/kotodoviewitem.cpp | 10 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 6 |
4 files changed, 15 insertions, 11 deletions
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp index adc733b..2a49528 100644 --- a/korganizer/koeditorgeneralevent.cpp +++ b/korganizer/koeditorgeneralevent.cpp @@ -384,41 +384,41 @@ void KOEditorGeneralEvent::emitDateTimeStr() } else { from = l->formatDateTime(mCurrStartDateTime); to = l->formatDateTime(mCurrEndDateTime); } QString str = i18n("From: %1 To: %2 %3").arg(from).arg(to) .arg(mDurationLabel->text()); emit dateTimeStrChanged(str); } bool KOEditorGeneralEvent::validateInput() { if (!mStartDateEdit->inputIsValid()) { KMessageBox::sorry( 0, - i18n("Please specify a valid start date, for example '%1'.") - .arg( KGlobal::locale()->formatDate( QDate::currentDate() ) ) ); + i18n("Please specify a valid start date,\nfor example '%1'.") + .arg( KGlobal::locale()->formatDate( QDate::currentDate(), true ) ) ); return false; } if (!mEndDateEdit->inputIsValid()) { KMessageBox::sorry( 0, - i18n("Please specify a valid end date, for example '%1'.") - .arg( KGlobal::locale()->formatDate( QDate::currentDate() ) ) ); + i18n("Please specify a valid end date,\nfor example '%1'.") + .arg( KGlobal::locale()->formatDate( QDate::currentDate(), true ) ) ); return false; } QDateTime startDt,endDt; startDt.setDate(mStartDateEdit->date()); endDt.setDate(mEndDateEdit->date()); if (!mNoTimeButton->isChecked()) { startDt.setTime(mStartTimeEdit->getTime()); endDt.setTime(mEndTimeEdit->getTime()); } if (startDt > endDt) { KMessageBox::sorry(0,i18n("The event ends before it starts.\n" "Please correct dates and times.")); return false; } diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index da81586..f595d35 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -540,33 +540,33 @@ void MonthViewCell::insertEvent(Event *event) } else item->setReply(false); #endif mItemList->insertItem( item ); mToolTip += "\n"; } void MonthViewCell::insertTodo(Todo *todo) { mItemList->setFocusPolicy(WheelFocus); QString text; if (todo->hasDueDate()) { if (!todo->doesFloat()) { text += KGlobal::locale()->formatTime(todo->dtDue().time()); text += " "; } } - text += i18n("Td: %1").arg(todo->summary()); + text += i18n("T: %1").arg(todo->summary()); MonthViewItem *item = new MonthViewItem( todo, mDate, text ); //item->setPalette( mStandardPalette ); QPalette pal; if (KOPrefs::instance()->mMonthViewUsesCategoryColor) { QStringList categories = todo->categories(); QString cat = categories.first(); if ( KOPrefs::instance()->mMonthViewUsesForegroundColor ) { pal = getPalette(); if (cat.isEmpty()) { pal.setColor(QColorGroup::Foreground,KOPrefs::instance()->mEventColor); } else { pal.setColor(QColorGroup::Foreground, *(KOPrefs::instance()->categoryColor(cat))); } } else { diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 44db209..0e847c2 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp @@ -258,59 +258,59 @@ void KOTodoViewItem::stateChange(bool state) QListViewItem * myChild = parent(); if ( myChild ) (static_cast<KOTodoViewItem*>(myChild))->stateChange(state); } mTodoView->modified(true); setMyPixmap(); mTodoView->setTodoModified( mTodo ); } bool KOTodoViewItem::isAlternate() { KOTodoListView *lv = static_cast<KOTodoListView *>(listView()); if (lv && lv->alternateBackground().isValid()) { KOTodoViewItem *above = 0; - above = dynamic_cast<KOTodoViewItem *>(itemAbove()); + above = static_cast<KOTodoViewItem *>(itemAbove()); m_known = above ? above->m_known : true; if (m_known) { m_odd = above ? !above->m_odd : false; } else { KOTodoViewItem *item; bool previous = true; if (QListViewItem::parent()) { - item = dynamic_cast<KOTodoViewItem *>(QListViewItem::parent()); + item = static_cast<KOTodoViewItem *>(QListViewItem::parent()); if (item) previous = item->m_odd; - item = dynamic_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild()); + item = static_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild()); } else { - item = dynamic_cast<KOTodoViewItem *>(lv->firstChild()); + item = static_cast<KOTodoViewItem *>(lv->firstChild()); } while(item) { item->m_odd = previous = !previous; item->m_known = true; - item = dynamic_cast<KOTodoViewItem *>(item->nextSibling()); + item = static_cast<KOTodoViewItem *>(item->nextSibling()); } } return m_odd; } return false; } void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) { QColorGroup _cg = cg; QColorGroup::ColorRole role; if ( KOPrefs::instance()->mTodoViewUsesForegroundColor ) role = QColorGroup::Text; else role = QColorGroup::Base; //#ifndef KORG_NOLVALTERNATION diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 10665f4..391b3bb 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -602,33 +602,37 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a if ( needClose ) { tempText += "] "; } if ( ev->cancelled() ) tempText += "</font>"; tempText += "<a "; if (ev->type()=="Event") tempText += "href=\"event:"; if (ev->type()=="Todo") 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 = noc.date().year() - ev->dtStart().date().year(); + int years = 0; + if ( ev->type() =="Todo" ) { + 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 ) |