summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditordetails.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 6ecf978..7354940 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -56,28 +56,32 @@ template <>
56CustomListViewItem<class Attendee *>::~CustomListViewItem() 56CustomListViewItem<class Attendee *>::~CustomListViewItem()
57{ 57{
58 delete mData; 58 delete mData;
59} 59}
60 60
61template <> 61template <>
62void CustomListViewItem<class Attendee *>::updateItem() 62void CustomListViewItem<class Attendee *>::updateItem()
63{ 63{
64 setText(0,mData->name()); 64 setText(0,mData->name());
65 setText(1,mData->email()); 65 setText(1,mData->email());
66 setText(2,mData->roleStr()); 66 setText(2,mData->roleStr());
67 setText(3,mData->statusStr()); 67 setText(3,mData->statusStr());
68 if (mData->RSVP() && !mData->email().isEmpty()) 68 if (mData->RSVP() && !mData->email().isEmpty()) {
69 setPixmap(4,SmallIcon("mailappt")); 69 setPixmap(4,SmallIcon("mailappt"));
70 else 70 setSortKey(4,"j");
71 }
72 else {
71 setPixmap(4,SmallIcon("nomailappt")); 73 setPixmap(4,SmallIcon("nomailappt"));
74 setSortKey(4,"n");
75 }
72} 76}
73 77
74 78
75KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) 79KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
76 : QWidget( parent, name), mDisableItemUpdate( false ) 80 : QWidget( parent, name), mDisableItemUpdate( false )
77{ 81{
78 QGridLayout *topLayout = new QGridLayout(this); 82 QGridLayout *topLayout = new QGridLayout(this);
79 topLayout->setSpacing(spacing); 83 topLayout->setSpacing(spacing);
80 84
81 QString organizer = KOPrefs::instance()->email(); 85 QString organizer = KOPrefs::instance()->email();
82 mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this); 86 mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this);
83 87
@@ -458,17 +462,19 @@ void KOEditorDetails::updateAttendeeItem()
458{ 462{
459 if (mDisableItemUpdate) return; 463 if (mDisableItemUpdate) return;
460 464
461 QListViewItem *item = mListView->selectedItem(); 465 QListViewItem *item = mListView->selectedItem();
462 AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item ); 466 AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item );
463 if ( !aItem ) return; 467 if ( !aItem ) return;
464 468
465 Attendee *a = aItem->data(); 469 Attendee *a = aItem->data();
466 470
467 a->setName( mNameEdit->text() ); 471 a->setName( mNameEdit->text() );
468 a->setUid( mUidEdit->text() ); 472 a->setUid( mUidEdit->text() );
469 a->setEmail( mEmailEdit->text() ); 473 a->setEmail( mEmailEdit->text() );
474 if ( mEmailEdit->text().isEmpty() )
475 mRsvpButton->setChecked( false );
476 a->setRSVP( mRsvpButton->isChecked() );
470 a->setRole( Attendee::Role( mRoleCombo->currentItem() ) ); 477 a->setRole( Attendee::Role( mRoleCombo->currentItem() ) );
471 a->setStatus( Attendee::PartStat( mStatusCombo->currentItem() ) ); 478 a->setStatus( Attendee::PartStat( mStatusCombo->currentItem() ) );
472 a->setRSVP( mRsvpButton->isChecked() );
473 aItem->updateItem(); 479 aItem->updateItem();
474} 480}