summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/koeditordetails.cpp13
-rw-r--r--korganizer/koeditordetails.h1
-rw-r--r--korganizer/koeventviewer.cpp4
4 files changed, 18 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 74aefb7..96fb5ca 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1516,25 +1516,25 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd
1516 1516
1517 1517
1518bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) 1518bool 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);
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index cf0a458..ef8025b 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -87,16 +87,20 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
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()));
@@ -418,12 +422,19 @@ void KOEditorDetails::setEnabledAttendeeInput( bool 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
428void KOEditorDetails::itemClicked(QListViewItem * item ,const QPoint & pnt, int c )
429{
430 if ( item && c == 4 ) {
431 mRsvpButton->setChecked( !mRsvpButton->isChecked() );
432 updateAttendeeItem();
433 }
434}
424void KOEditorDetails::updateAttendeeItem() 435void 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 );
diff --git a/korganizer/koeditordetails.h b/korganizer/koeditordetails.h
index 0cc807f..a33ee82 100644
--- a/korganizer/koeditordetails.h
+++ b/korganizer/koeditordetails.h
@@ -80,12 +80,13 @@ class KOEditorDetails : public QWidget
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
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 5de667e..2f0fa9e 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -414,12 +414,13 @@ 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();
@@ -490,13 +491,16 @@ void KOEventViewer::formatAttendees(Incidence *event)
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 + "\">";
497 if ( a->RSVP() )
496 mText += "<IMG src=\"" + iconPath + "\">"; 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 )