author | zautrix <zautrix> | 2005-01-30 00:33:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-30 00:33:46 (UTC) |
commit | a8fae20ad7bcb59df9a603c88accf3a10401c2f9 (patch) (unidiff) | |
tree | 12deeef9bae6d470c244ce9a9916c59d6879f9b2 /korganizer | |
parent | d94b52aa95cc52aa1bef7c9cd99f43c725ed8042 (diff) | |
download | kdepimpi-a8fae20ad7bcb59df9a603c88accf3a10401c2f9.zip kdepimpi-a8fae20ad7bcb59df9a603c88accf3a10401c2f9.tar.gz kdepimpi-a8fae20ad7bcb59df9a603c88accf3a10401c2f9.tar.bz2 |
f
-rw-r--r-- | korganizer/calendarview.cpp | 2 | ||||
-rw-r--r-- | korganizer/koeditordetails.cpp | 13 | ||||
-rw-r--r-- | korganizer/koeditordetails.h | 1 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 6 |
4 files changed, 19 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 74aefb7..96fb5ca 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1498,61 +1498,61 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd | |||
1498 | ++addCount; | 1498 | ++addCount; |
1499 | } | 1499 | } |
1500 | 1500 | ||
1501 | if ( anniversary.isValid() ){ | 1501 | if ( anniversary.isValid() ){ |
1502 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, | 1502 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, |
1503 | KCal::Attendee::ReqParticipant,uid) ; | 1503 | KCal::Attendee::ReqParticipant,uid) ; |
1504 | if ( addAnniversary( anniversary, assembledName, a, false ) ) | 1504 | if ( addAnniversary( anniversary, assembledName, a, false ) ) |
1505 | ++addCount; | 1505 | ++addCount; |
1506 | } | 1506 | } |
1507 | } | 1507 | } |
1508 | 1508 | ||
1509 | updateView(); | 1509 | updateView(); |
1510 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); | 1510 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |
1511 | 1511 | ||
1512 | } | 1512 | } |
1513 | 1513 | ||
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | 1516 | ||
1517 | 1517 | ||
1518 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) | 1518 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) |
1519 | { | 1519 | { |
1520 | //qDebug("addAnni "); | 1520 | //qDebug("addAnni "); |
1521 | Event * ev = new Event(); | 1521 | Event * ev = new Event(); |
1522 | ev->setOrganizer(KOPrefs::instance()->email()); | ||
1522 | if ( a ) { | 1523 | if ( a ) { |
1523 | ev->addAttendee( a ); | 1524 | ev->addAttendee( a ); |
1524 | } | 1525 | } |
1525 | QString kind; | 1526 | QString kind; |
1526 | if ( birthday ) { | 1527 | if ( birthday ) { |
1527 | kind = i18n( "Birthday" ); | 1528 | kind = i18n( "Birthday" ); |
1528 | ev->setSummary( name + " (" + QString::number(date.year()) +")"); | 1529 | ev->setSummary( name + " (" + QString::number(date.year()) +")"); |
1529 | } | 1530 | } |
1530 | else { | 1531 | else { |
1531 | kind = i18n( "Anniversary" ); | 1532 | kind = i18n( "Anniversary" ); |
1532 | ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); | 1533 | ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); |
1533 | } | 1534 | } |
1534 | //ev->setOrganizer(a->email()); | ||
1535 | ev->setCategories( kind ); | 1535 | ev->setCategories( kind ); |
1536 | ev->setDtStart( QDateTime(date) ); | 1536 | ev->setDtStart( QDateTime(date) ); |
1537 | ev->setDtEnd( QDateTime(date) ); | 1537 | ev->setDtEnd( QDateTime(date) ); |
1538 | ev->setFloats( true ); | 1538 | ev->setFloats( true ); |
1539 | Recurrence * rec = ev->recurrence(); | 1539 | Recurrence * rec = ev->recurrence(); |
1540 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); | 1540 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); |
1541 | rec->addYearlyNum( date.month() ); | 1541 | rec->addYearlyNum( date.month() ); |
1542 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { | 1542 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { |
1543 | delete ev; | 1543 | delete ev; |
1544 | return false; | 1544 | return false; |
1545 | } | 1545 | } |
1546 | return true; | 1546 | return true; |
1547 | 1547 | ||
1548 | } | 1548 | } |
1549 | bool CalendarView::importQtopia( const QString &categories, | 1549 | bool CalendarView::importQtopia( const QString &categories, |
1550 | const QString &datebook, | 1550 | const QString &datebook, |
1551 | const QString &todolist ) | 1551 | const QString &todolist ) |
1552 | { | 1552 | { |
1553 | 1553 | ||
1554 | QtopiaFormat qtopiaFormat; | 1554 | QtopiaFormat qtopiaFormat; |
1555 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 1555 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
1556 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); | 1556 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); |
1557 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); | 1557 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); |
1558 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); | 1558 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); |
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp index cf0a458..ef8025b 100644 --- a/korganizer/koeditordetails.cpp +++ b/korganizer/koeditordetails.cpp | |||
@@ -69,52 +69,56 @@ void CustomListViewItem<class Attendee *>::updateItem() | |||
69 | setPixmap(4,SmallIcon("mailappt")); | 69 | setPixmap(4,SmallIcon("mailappt")); |
70 | else | 70 | else |
71 | setPixmap(4,SmallIcon("nomailappt")); | 71 | setPixmap(4,SmallIcon("nomailappt")); |
72 | } | 72 | } |
73 | 73 | ||
74 | 74 | ||
75 | KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) | 75 | KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) |
76 | : QWidget( parent, name), mDisableItemUpdate( false ) | 76 | : QWidget( parent, name), mDisableItemUpdate( false ) |
77 | { | 77 | { |
78 | QGridLayout *topLayout = new QGridLayout(this); | 78 | QGridLayout *topLayout = new QGridLayout(this); |
79 | topLayout->setSpacing(spacing); | 79 | topLayout->setSpacing(spacing); |
80 | 80 | ||
81 | QString organizer = KOPrefs::instance()->email(); | 81 | QString organizer = KOPrefs::instance()->email(); |
82 | mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this); | 82 | mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this); |
83 | 83 | ||
84 | mListView = new KListView(this,"mListView"); | 84 | mListView = new KListView(this,"mListView"); |
85 | mListView->addColumn(i18n("Name"),180); | 85 | mListView->addColumn(i18n("Name"),180); |
86 | mListView->addColumn(i18n("Email"),180); | 86 | mListView->addColumn(i18n("Email"),180); |
87 | mListView->addColumn(i18n("Role"),60); | 87 | mListView->addColumn(i18n("Role"),60); |
88 | mListView->addColumn(i18n("Status"),100); | 88 | mListView->addColumn(i18n("Status"),100); |
89 | mListView->addColumn(i18n("RSVP"),35); | 89 | mListView->addColumn(i18n("RSVP"),35); |
90 | if ( KOPrefs::instance()->mCompactDialogs ) { | 90 | if ( KOPrefs::instance()->mCompactDialogs ) { |
91 | //mListView->setFixedHeight(78); | 91 | //mListView->setFixedHeight(78); |
92 | } | 92 | } |
93 | 93 | mListView->setAllColumnsShowFocus (true ); | |
94 | //mListView->setSingleClick( true ); | ||
94 | connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), | 95 | connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), |
95 | SLOT(updateAttendeeInput())); | 96 | SLOT(updateAttendeeInput())); |
96 | 97 | ||
98 | connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )), | ||
99 | SLOT(itemClicked(QListViewItem * ,const QPoint& , int ))); | ||
100 | |||
97 | QLabel *attendeeLabel = new QLabel(this); | 101 | QLabel *attendeeLabel = new QLabel(this); |
98 | attendeeLabel->setText(i18n("Name:")); | 102 | attendeeLabel->setText(i18n("Name:")); |
99 | attendeeLabel->setFixedSize( attendeeLabel->sizeHint() ); | 103 | attendeeLabel->setFixedSize( attendeeLabel->sizeHint() ); |
100 | mNameEdit = new QLineEdit(this); | 104 | mNameEdit = new QLineEdit(this); |
101 | connect(mNameEdit,SIGNAL(textChanged(const QString &)), | 105 | connect(mNameEdit,SIGNAL(textChanged(const QString &)), |
102 | SLOT(updateAttendeeItem())); | 106 | SLOT(updateAttendeeItem())); |
103 | 107 | ||
104 | mUidEdit = new QLineEdit(0); | 108 | mUidEdit = new QLineEdit(0); |
105 | mUidEdit->setText(""); | 109 | mUidEdit->setText(""); |
106 | 110 | ||
107 | QLabel *emailLabel = new QLabel(this); | 111 | QLabel *emailLabel = new QLabel(this); |
108 | emailLabel->setText(i18n("Email:")); | 112 | emailLabel->setText(i18n("Email:")); |
109 | mEmailEdit = new QLineEdit(this); | 113 | mEmailEdit = new QLineEdit(this); |
110 | connect(mEmailEdit,SIGNAL(textChanged(const QString &)), | 114 | connect(mEmailEdit,SIGNAL(textChanged(const QString &)), |
111 | SLOT(updateAttendeeItem())); | 115 | SLOT(updateAttendeeItem())); |
112 | 116 | ||
113 | QLabel *attendeeRoleLabel = new QLabel(this); | 117 | QLabel *attendeeRoleLabel = new QLabel(this); |
114 | attendeeRoleLabel->setText(i18n("Role:")); | 118 | attendeeRoleLabel->setText(i18n("Role:")); |
115 | mRoleCombo = new QComboBox(false,this); | 119 | mRoleCombo = new QComboBox(false,this); |
116 | mRoleCombo->insertStringList(Attendee::roleList()); | 120 | mRoleCombo->insertStringList(Attendee::roleList()); |
117 | connect(mRoleCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); | 121 | connect(mRoleCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); |
118 | 122 | ||
119 | QLabel *statusLabel = new QLabel(this); | 123 | QLabel *statusLabel = new QLabel(this); |
120 | statusLabel->setText( i18n("Status:") ); | 124 | statusLabel->setText( i18n("Status:") ); |
@@ -400,42 +404,49 @@ void KOEditorDetails::fillAttendeeInput( AttendeeListItem *aItem ) | |||
400 | mDisableItemUpdate = true; | 404 | mDisableItemUpdate = true; |
401 | mNameEdit->setText(a->name()); | 405 | mNameEdit->setText(a->name()); |
402 | mUidEdit->setText(a->uid()); | 406 | mUidEdit->setText(a->uid()); |
403 | mEmailEdit->setText(a->email()); | 407 | mEmailEdit->setText(a->email()); |
404 | mRoleCombo->setCurrentItem(a->role()); | 408 | mRoleCombo->setCurrentItem(a->role()); |
405 | mStatusCombo->setCurrentItem(a->status()); | 409 | mStatusCombo->setCurrentItem(a->status()); |
406 | mRsvpButton->setChecked(a->RSVP()); | 410 | mRsvpButton->setChecked(a->RSVP()); |
407 | 411 | ||
408 | mDisableItemUpdate = false; | 412 | mDisableItemUpdate = false; |
409 | 413 | ||
410 | setEnabledAttendeeInput( true ); | 414 | setEnabledAttendeeInput( true ); |
411 | } | 415 | } |
412 | 416 | ||
413 | void KOEditorDetails::setEnabledAttendeeInput( bool enabled ) | 417 | void KOEditorDetails::setEnabledAttendeeInput( bool enabled ) |
414 | { | 418 | { |
415 | mNameEdit->setEnabled( enabled ); | 419 | mNameEdit->setEnabled( enabled ); |
416 | mEmailEdit->setEnabled( enabled ); | 420 | mEmailEdit->setEnabled( enabled ); |
417 | mRoleCombo->setEnabled( enabled ); | 421 | mRoleCombo->setEnabled( enabled ); |
418 | mStatusCombo->setEnabled( enabled ); | 422 | mStatusCombo->setEnabled( enabled ); |
419 | mRsvpButton->setEnabled( enabled ); | 423 | mRsvpButton->setEnabled( enabled ); |
420 | 424 | ||
421 | mRemoveButton->setEnabled( enabled ); | 425 | mRemoveButton->setEnabled( enabled ); |
422 | } | 426 | } |
423 | 427 | ||
428 | void KOEditorDetails::itemClicked(QListViewItem * item ,const QPoint & pnt, int c ) | ||
429 | { | ||
430 | if ( item && c == 4 ) { | ||
431 | mRsvpButton->setChecked( !mRsvpButton->isChecked() ); | ||
432 | updateAttendeeItem(); | ||
433 | } | ||
434 | } | ||
424 | void KOEditorDetails::updateAttendeeItem() | 435 | void KOEditorDetails::updateAttendeeItem() |
425 | { | 436 | { |
426 | if (mDisableItemUpdate) return; | 437 | if (mDisableItemUpdate) return; |
427 | 438 | ||
428 | QListViewItem *item = mListView->selectedItem(); | 439 | QListViewItem *item = mListView->selectedItem(); |
429 | AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item ); | 440 | AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item ); |
430 | if ( !aItem ) return; | 441 | if ( !aItem ) return; |
431 | 442 | ||
432 | Attendee *a = aItem->data(); | 443 | Attendee *a = aItem->data(); |
433 | 444 | ||
434 | a->setName( mNameEdit->text() ); | 445 | a->setName( mNameEdit->text() ); |
435 | a->setUid( mUidEdit->text() ); | 446 | a->setUid( mUidEdit->text() ); |
436 | a->setEmail( mEmailEdit->text() ); | 447 | a->setEmail( mEmailEdit->text() ); |
437 | a->setRole( Attendee::Role( mRoleCombo->currentItem() ) ); | 448 | a->setRole( Attendee::Role( mRoleCombo->currentItem() ) ); |
438 | a->setStatus( Attendee::PartStat( mStatusCombo->currentItem() ) ); | 449 | a->setStatus( Attendee::PartStat( mStatusCombo->currentItem() ) ); |
439 | a->setRSVP( mRsvpButton->isChecked() ); | 450 | a->setRSVP( mRsvpButton->isChecked() ); |
440 | aItem->updateItem(); | 451 | aItem->updateItem(); |
441 | } | 452 | } |
diff --git a/korganizer/koeditordetails.h b/korganizer/koeditordetails.h index 0cc807f..a33ee82 100644 --- a/korganizer/koeditordetails.h +++ b/korganizer/koeditordetails.h | |||
@@ -62,47 +62,48 @@ class KOEditorDetails : public QWidget | |||
62 | /** Read event object and setup widgets accordingly */ | 62 | /** Read event object and setup widgets accordingly */ |
63 | void readEvent(Incidence *); | 63 | void readEvent(Incidence *); |
64 | /** Write event settings to event object */ | 64 | /** Write event settings to event object */ |
65 | void writeEvent(Incidence *); | 65 | void writeEvent(Incidence *); |
66 | 66 | ||
67 | /** return a clone of the event with attendees to be canceld*/ | 67 | /** return a clone of the event with attendees to be canceld*/ |
68 | void cancelAttendeeEvent(Incidence *); | 68 | void cancelAttendeeEvent(Incidence *); |
69 | /** Check if the input is valid. */ | 69 | /** Check if the input is valid. */ |
70 | bool validateInput(); | 70 | bool validateInput(); |
71 | 71 | ||
72 | public slots: | 72 | public slots: |
73 | void insertAttendee(Attendee *); | 73 | void insertAttendee(Attendee *); |
74 | // called when the app recieves a list of name/email/uid (=addresses) from another app. Usually Ka/Pi | 74 | // called when the app recieves a list of name/email/uid (=addresses) from another app. Usually Ka/Pi |
75 | // The first parameter is a uniqueid. It can be used to identify if event | 75 | // The first parameter is a uniqueid. It can be used to identify if event |
76 | void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist); | 76 | void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist); |
77 | 77 | ||
78 | 78 | ||
79 | protected slots: | 79 | protected slots: |
80 | void addNewAttendee(); | 80 | void addNewAttendee(); |
81 | void removeAttendee(); | 81 | void removeAttendee(); |
82 | void openAddressBook(); | 82 | void openAddressBook(); |
83 | void updateAttendeeInput(); | 83 | void updateAttendeeInput(); |
84 | void clearAttendeeInput(); | 84 | void clearAttendeeInput(); |
85 | void fillAttendeeInput(AttendeeListItem *); | 85 | void fillAttendeeInput(AttendeeListItem *); |
86 | void itemClicked(QListViewItem *,const QPoint & pnt, int c); | ||
86 | void updateAttendeeItem(); | 87 | void updateAttendeeItem(); |
87 | void setEnabledAttendeeInput(bool); | 88 | void setEnabledAttendeeInput(bool); |
88 | 89 | ||
89 | private: | 90 | private: |
90 | bool mDisableItemUpdate; | 91 | bool mDisableItemUpdate; |
91 | 92 | ||
92 | QLineEdit *mNameEdit; | 93 | QLineEdit *mNameEdit; |
93 | QLineEdit *mUidEdit; | 94 | QLineEdit *mUidEdit; |
94 | QLineEdit *mEmailEdit; | 95 | QLineEdit *mEmailEdit; |
95 | KListView *mListView; | 96 | KListView *mListView; |
96 | QComboBox* mRoleCombo; | 97 | QComboBox* mRoleCombo; |
97 | QCheckBox* mRsvpButton; | 98 | QCheckBox* mRsvpButton; |
98 | QComboBox* mStatusCombo; | 99 | QComboBox* mStatusCombo; |
99 | QLabel *mOrganizerLabel; | 100 | QLabel *mOrganizerLabel; |
100 | 101 | ||
101 | QPushButton* mAddButton; | 102 | QPushButton* mAddButton; |
102 | QPushButton* mRemoveButton; | 103 | QPushButton* mRemoveButton; |
103 | QPushButton* mAddressBookButton; | 104 | QPushButton* mAddressBookButton; |
104 | 105 | ||
105 | QPtrList<Attendee> mdelAttendees; | 106 | QPtrList<Attendee> mdelAttendees; |
106 | }; | 107 | }; |
107 | 108 | ||
108 | #endif | 109 | #endif |
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 5de667e..2f0fa9e 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -396,48 +396,49 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
396 | mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); | 396 | mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); |
397 | 397 | ||
398 | } | 398 | } |
399 | setText(mText); | 399 | setText(mText); |
400 | } | 400 | } |
401 | 401 | ||
402 | void KOEventViewer::formatCategories(Incidence *event) | 402 | void KOEventViewer::formatCategories(Incidence *event) |
403 | { | 403 | { |
404 | if (!event->categoriesStr().isEmpty()) { | 404 | if (!event->categoriesStr().isEmpty()) { |
405 | if (event->categories().count() == 1) { | 405 | if (event->categories().count() == 1) { |
406 | addTag("h3",i18n("Category")); | 406 | addTag("h3",i18n("Category")); |
407 | } else { | 407 | } else { |
408 | addTag("h3",i18n("Categories")); | 408 | addTag("h3",i18n("Categories")); |
409 | } | 409 | } |
410 | addTag("p",event->categoriesStr()); | 410 | addTag("p",event->categoriesStr()); |
411 | } | 411 | } |
412 | } | 412 | } |
413 | void KOEventViewer::formatAttendees(Incidence *event) | 413 | void KOEventViewer::formatAttendees(Incidence *event) |
414 | { | 414 | { |
415 | QPtrList<Attendee> attendees = event->attendees(); | 415 | QPtrList<Attendee> attendees = event->attendees(); |
416 | if (attendees.count()) { | 416 | if (attendees.count()) { |
417 | 417 | ||
418 | 418 | ||
419 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); | 419 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); |
420 | QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); | ||
420 | addTag("h3",i18n("Organizer")); | 421 | addTag("h3",i18n("Organizer")); |
421 | mText.append("<ul><li>"); | 422 | mText.append("<ul><li>"); |
422 | #ifndef KORG_NOKABC | 423 | #ifndef KORG_NOKABC |
423 | 424 | ||
424 | #ifdef DESKTOP_VERSION | 425 | #ifdef DESKTOP_VERSION |
425 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); | 426 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); |
426 | KABC::Addressee::List addressList; | 427 | KABC::Addressee::List addressList; |
427 | addressList = add_book->findByEmail(event->organizer()); | 428 | addressList = add_book->findByEmail(event->organizer()); |
428 | KABC::Addressee o = addressList.first(); | 429 | KABC::Addressee o = addressList.first(); |
429 | if (!o.isEmpty() && addressList.size()<2) { | 430 | if (!o.isEmpty() && addressList.size()<2) { |
430 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 431 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
431 | mText += o.formattedName(); | 432 | mText += o.formattedName(); |
432 | mText += "</a>\n"; | 433 | mText += "</a>\n"; |
433 | } else { | 434 | } else { |
434 | mText.append(event->organizer()); | 435 | mText.append(event->organizer()); |
435 | } | 436 | } |
436 | #else //DESKTOP_VERSION | 437 | #else //DESKTOP_VERSION |
437 | mText += "<a href=\"uid:organizer\">"; | 438 | mText += "<a href=\"uid:organizer\">"; |
438 | mText += event->organizer(); | 439 | mText += event->organizer(); |
439 | mText += "</a>\n"; | 440 | mText += "</a>\n"; |
440 | #endif //DESKTOP_VERSION | 441 | #endif //DESKTOP_VERSION |
441 | 442 | ||
442 | 443 | ||
443 | #else | 444 | #else |
@@ -472,49 +473,52 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
472 | } else { | 473 | } else { |
473 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 474 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
474 | if (!a->name().isEmpty()) mText += a->name(); | 475 | if (!a->name().isEmpty()) mText += a->name(); |
475 | else mText += a->email(); | 476 | else mText += a->email(); |
476 | mText += "</a>\n"; | 477 | mText += "</a>\n"; |
477 | } | 478 | } |
478 | #else //DESKTOP_VERSION | 479 | #else //DESKTOP_VERSION |
479 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 480 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
480 | if (!a->name().isEmpty()) mText += a->name(); | 481 | if (!a->name().isEmpty()) mText += a->name(); |
481 | else mText += a->email(); | 482 | else mText += a->email(); |
482 | mText += "</a>\n"; | 483 | mText += "</a>\n"; |
483 | #endif //DESKTOP_VERSION | 484 | #endif //DESKTOP_VERSION |
484 | #else | 485 | #else |
485 | //qDebug("nokabc "); | 486 | //qDebug("nokabc "); |
486 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 487 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
487 | if (!a->name().isEmpty()) mText += a->name(); | 488 | if (!a->name().isEmpty()) mText += a->name(); |
488 | else mText += a->email(); | 489 | else mText += a->email(); |
489 | mText += "</a>\n"; | 490 | mText += "</a>\n"; |
490 | #endif | 491 | #endif |
491 | 492 | ||
492 | 493 | ||
493 | if (!a->email().isEmpty()) { | 494 | if (!a->email().isEmpty()) { |
494 | if (iconPath) { | 495 | if (iconPath) { |
495 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; | 496 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; |
496 | mText += "<IMG src=\"" + iconPath + "\">"; | 497 | if ( a->RSVP() ) |
498 | mText += "<IMG src=\"" + iconPath + "\">"; | ||
499 | else | ||
500 | mText += "<IMG src=\"" + NOiconPath + "\">"; | ||
497 | mText += "</a>\n"; | 501 | mText += "</a>\n"; |
498 | } | 502 | } |
499 | } | 503 | } |
500 | if (a->status() != Attendee::NeedsAction ) | 504 | if (a->status() != Attendee::NeedsAction ) |
501 | mText +="[" + a->statusStr() + "] "; | 505 | mText +="[" + a->statusStr() + "] "; |
502 | if (a->role() == Attendee::Chair ) | 506 | if (a->role() == Attendee::Chair ) |
503 | mText +="(" + a->roleStr().left(1) + ".)"; | 507 | mText +="(" + a->roleStr().left(1) + ".)"; |
504 | } | 508 | } |
505 | mText.append("</li></ul>"); | 509 | mText.append("</li></ul>"); |
506 | } | 510 | } |
507 | 511 | ||
508 | } | 512 | } |
509 | void KOEventViewer::appendJournal(Journal *jour, int mode ) | 513 | void KOEventViewer::appendJournal(Journal *jour, int mode ) |
510 | { | 514 | { |
511 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 515 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
512 | if (mode == 0 ) { | 516 | if (mode == 0 ) { |
513 | addTag("h2",i18n("Journal from: ")); | 517 | addTag("h2",i18n("Journal from: ")); |
514 | } | 518 | } |
515 | else { | 519 | else { |
516 | if ( mode == 1 ) { | 520 | if ( mode == 1 ) { |
517 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); | 521 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); |
518 | } else { | 522 | } else { |
519 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); | 523 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); |
520 | } | 524 | } |