author | zautrix <zautrix> | 2004-10-26 00:26:43 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-26 00:26:43 (UTC) |
commit | d9a3130b909cc32cfdee4cc6136105d9a488f357 (patch) (unidiff) | |
tree | 78e3cb0d8552f5a369f507b6b29eede81754db6b | |
parent | 283cdf0b976a66c8e29ac327385472844d92f581 (diff) | |
download | kdepimpi-d9a3130b909cc32cfdee4cc6136105d9a488f357.zip kdepimpi-d9a3130b909cc32cfdee4cc6136105d9a488f357.tar.gz kdepimpi-d9a3130b909cc32cfdee4cc6136105d9a488f357.tar.bz2 |
set organizer when importing b days
-rw-r--r-- | korganizer/calendarview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index e64d83a..284ddbf 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1441,49 +1441,49 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd | |||
1441 | } | 1441 | } |
1442 | 1442 | ||
1443 | updateView(); | 1443 | updateView(); |
1444 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); | 1444 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |
1445 | 1445 | ||
1446 | } | 1446 | } |
1447 | 1447 | ||
1448 | } | 1448 | } |
1449 | 1449 | ||
1450 | 1450 | ||
1451 | 1451 | ||
1452 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) | 1452 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) |
1453 | { | 1453 | { |
1454 | //qDebug("addAnni "); | 1454 | //qDebug("addAnni "); |
1455 | Event * ev = new Event(); | 1455 | Event * ev = new Event(); |
1456 | if ( a ) { | 1456 | if ( a ) { |
1457 | ev->addAttendee( a ); | 1457 | ev->addAttendee( a ); |
1458 | } | 1458 | } |
1459 | QString kind; | 1459 | QString kind; |
1460 | if ( birthday ) | 1460 | if ( birthday ) |
1461 | kind = i18n( "Birthday" ); | 1461 | kind = i18n( "Birthday" ); |
1462 | else | 1462 | else |
1463 | kind = i18n( "Anniversary" ); | 1463 | kind = i18n( "Anniversary" ); |
1464 | ev->setSummary( name + " - " + kind ); | 1464 | ev->setSummary( name + " - " + kind ); |
1465 | ev->setOrganizer( "nobody@nowhere" ); | 1465 | ev->setOrganizer(a->email()); |
1466 | ev->setCategories( kind ); | 1466 | ev->setCategories( kind ); |
1467 | ev->setDtStart( QDateTime(date) ); | 1467 | ev->setDtStart( QDateTime(date) ); |
1468 | ev->setDtEnd( QDateTime(date) ); | 1468 | ev->setDtEnd( QDateTime(date) ); |
1469 | ev->setFloats( true ); | 1469 | ev->setFloats( true ); |
1470 | Recurrence * rec = ev->recurrence(); | 1470 | Recurrence * rec = ev->recurrence(); |
1471 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); | 1471 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); |
1472 | rec->addYearlyNum( date.month() ); | 1472 | rec->addYearlyNum( date.month() ); |
1473 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { | 1473 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { |
1474 | delete ev; | 1474 | delete ev; |
1475 | return false; | 1475 | return false; |
1476 | } | 1476 | } |
1477 | return true; | 1477 | return true; |
1478 | 1478 | ||
1479 | } | 1479 | } |
1480 | bool CalendarView::importQtopia( const QString &categories, | 1480 | bool CalendarView::importQtopia( const QString &categories, |
1481 | const QString &datebook, | 1481 | const QString &datebook, |
1482 | const QString &todolist ) | 1482 | const QString &todolist ) |
1483 | { | 1483 | { |
1484 | 1484 | ||
1485 | QtopiaFormat qtopiaFormat; | 1485 | QtopiaFormat qtopiaFormat; |
1486 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 1486 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
1487 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); | 1487 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); |
1488 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); | 1488 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); |
1489 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); | 1489 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); |