author | zautrix <zautrix> | 2005-01-27 12:14:32 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-27 12:14:32 (UTC) |
commit | c8b484570a9cf8aacc070f92141c8bcfebbf3a93 (patch) (side-by-side diff) | |
tree | af81a25ccc142582a60a5ed100dcd44956255b62 | |
parent | 9ff00e650e32d6f348a2333c9cf21da9c9a137ff (diff) | |
download | kdepimpi-c8b484570a9cf8aacc070f92141c8bcfebbf3a93.zip kdepimpi-c8b484570a9cf8aacc070f92141c8bcfebbf3a93.tar.gz kdepimpi-c8b484570a9cf8aacc070f92141c8bcfebbf3a93.tar.bz2 |
birthday fixes
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 3 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 11 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 11 |
4 files changed, 23 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 6c4cb7b..4c00770 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -1,28 +1,31 @@ Info about the changes in new versions of KDE-Pim/Pi ********** VERSION 2.0.0 ************ Stable release 2.0.0! KO/Pi: Fixed problem in edit dialog recreation at startup. Made "toggle view*" menu items enabled context sensitive. Changed agenda size menu to items 1-10. Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. Usebility enhancements in the KO/Pi menus. +Birthday import now adds year to summary. +What's Next view shows age in years for birthday. + OM/Pi: Added three info lines to display subject, from and to of selected mails. ********** VERSION 1.9.20 ************ KO/Pi: Added for the "dislplay one day" agenda mode info in the caption and in the day lables: Now it is displayed, if the selected day is from "day before yesterday" to "day after tomorrow". Made it possible to delete a Todo, which has sub-todos. Fixed two small problems in the todo view. Added missing German translation for filter edit and print dialog. Made search dialog closeable by cancel key. Made it possible to select in the date picker the (ligt grey ) diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index e55d17e..dce95cd 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1180,24 +1180,24 @@ { "Edit Selection...","Editiere Selektion..." }, { "recurring events","wiederholende Ereignisse" }, { "completed to-dos","erledigte Todos" }, { "events","Ereignisse" }, { "todos","Todos" }, { "journals","Journale" }, { "public","öffentlich" }, { "private","privat" }, { "confidential","vertraulich" }, { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, { "Yesterday","Gestern" }, { "Day after tomorrow","Übermorgen" }, { "Tomorrow","Morgen" }, { "Day before yesterday","Vorgestern" }, { "Size %1","Größe %1" }, { "New Agendasize: %1","Neue Agendagröße: %1" }, -{ "","" }, +{ " (%1 y.)"," (%1 J.)" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 1d5a57e..257a4dd 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1510,37 +1510,40 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); } } bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) { //qDebug("addAnni "); Event * ev = new Event(); if ( a ) { ev->addAttendee( a ); } QString kind; - if ( birthday ) + if ( birthday ) { kind = i18n( "Birthday" ); - else + ev->setSummary( name + " (" + QString::number(date.year()) +")"); + } + else { kind = i18n( "Anniversary" ); - ev->setSummary( name + " - " + kind ); + ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); + } ev->setOrganizer(a->email()); ev->setCategories( kind ); ev->setDtStart( QDateTime(date) ); ev->setDtEnd( QDateTime(date) ); ev->setFloats( true ); Recurrence * rec = ev->recurrence(); rec->setYearly(Recurrence::rYearlyMonth,1,-1); rec->addYearlyNum( date.month() ); if ( !mCalendar->addAnniversaryNoDup( ev ) ) { delete ev; return false; } return true; } bool CalendarView::importQtopia( const QString &categories, @@ -2498,47 +2501,49 @@ void CalendarView::showDatePicker( ) int dh = QApplication::desktop()->height(); mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); mDateFrame->show(); } mDatePickerMode = 1; mDatePicker->setDate( mNavigator->selectedDates().first() ); } void CalendarView::showEventEditor() { #ifdef DESKTOP_VERSION mEventEditor->show(); #else if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); + qApp->processEvents(); delete mEventEditor; mEventEditor = mDialogManager->getEventEditor(); topLevelWidget()->setCaption( i18n("") ); } mEventEditor->showMaximized(); #endif } void CalendarView::showTodoEditor() { #ifdef DESKTOP_VERSION mTodoEditor->show(); #else if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); + qApp->processEvents(); delete mTodoEditor; mTodoEditor = mDialogManager->getTodoEditor(); topLevelWidget()->setCaption( i18n("") ); } mTodoEditor->showMaximized(); #endif } void CalendarView::cloneIncidence() { Incidence *incidence = currentSelection(); if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); if ( incidence ) { cloneIncidence(incidence); } } diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 7166a01..4111c5d 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -587,32 +587,40 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a tempText += "r"; needClose =true; } 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 ( ev->categories().contains( i18n("Birthday") ) || ev->categories().contains( i18n("Anniversary") ) ) { + noc = ev->getNextOccurence( cdt, &ok ); + if ( ok ) { + int 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 ); @@ -642,33 +650,36 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) if ( !needClose) mText +="["; mText += "i"; 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() +")"; if ( !isSub ) { if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents) |