-rw-r--r-- | korganizer/publishdialog.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/korganizer/publishdialog.cpp b/korganizer/publishdialog.cpp index 176595a..4323b91 100644 --- a/korganizer/publishdialog.cpp +++ b/korganizer/publishdialog.cpp | |||
@@ -103,50 +103,48 @@ void PublishDialog::removeItem() | |||
103 | mNameLineEdit->setEnabled(false); | 103 | mNameLineEdit->setEnabled(false); |
104 | mEmailLineEdit->setEnabled(false); | 104 | mEmailLineEdit->setEnabled(false); |
105 | } | 105 | } |
106 | } | 106 | } |
107 | 107 | ||
108 | void PublishDialog::openAddressbook() | 108 | void PublishDialog::openAddressbook() |
109 | { | 109 | { |
110 | #ifndef KORG_NOKABC | 110 | #ifndef KORG_NOKABC |
111 | KABC::Addressee::List addressList; | 111 | KABC::Addressee::List addressList; |
112 | addressList = KABC::AddresseeDialog::getAddressees(this); | 112 | addressList = KABC::AddresseeDialog::getAddressees(this); |
113 | //KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this); | 113 | //KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this); |
114 | KABC::Addressee a = addressList.first(); | 114 | KABC::Addressee a = addressList.first(); |
115 | if (!a.isEmpty()) { | 115 | if (!a.isEmpty()) { |
116 | uint i; | 116 | uint i; |
117 | for (i=0;i<addressList.count();i++) { | 117 | for (i=0;i<addressList.count();i++) { |
118 | a = addressList[i]; | 118 | a = addressList[i]; |
119 | mNameLineEdit->setEnabled(true); | 119 | mNameLineEdit->setEnabled(true); |
120 | mEmailLineEdit->setEnabled(true); | 120 | mEmailLineEdit->setEnabled(true); |
121 | QListViewItem *item = new QListViewItem(mAddressListView); | 121 | QListViewItem *item = new QListViewItem(mAddressListView); |
122 | mAddressListView->setSelected(item,true); | 122 | mAddressListView->setSelected(item,true); |
123 | mNameLineEdit->setText(a.realName()); | 123 | mNameLineEdit->setText(a.realName()); |
124 | mEmailLineEdit->setText(a.preferredEmail()); | 124 | mEmailLineEdit->setText(a.preferredEmail()); |
125 | mAddressListView->insertItem(item); | 125 | mAddressListView->insertItem(item); |
126 | } | 126 | } |
127 | } | 127 | } |
128 | #endif | 128 | #endif |
129 | } | 129 | } |
130 | 130 | ||
131 | void PublishDialog::updateItem() | 131 | void PublishDialog::updateItem() |
132 | { | 132 | { |
133 | QListViewItem *item; | 133 | QListViewItem *item; |
134 | item = mAddressListView->selectedItem(); | 134 | item = mAddressListView->selectedItem(); |
135 | if (!item) return; | 135 | if (!item) return; |
136 | item->setText(0,mNameLineEdit->text()); | 136 | item->setText(0,mNameLineEdit->text()); |
137 | item->setText(1,mEmailLineEdit->text()); | 137 | item->setText(1,mEmailLineEdit->text()); |
138 | } | 138 | } |
139 | 139 | ||
140 | void PublishDialog::updateInput() | 140 | void PublishDialog::updateInput() |
141 | { | 141 | { |
142 | QListViewItem *item; | 142 | QListViewItem *item; |
143 | item = mAddressListView->selectedItem(); | 143 | item = mAddressListView->selectedItem(); |
144 | if (!item) return; | 144 | if (!item) return; |
145 | mNameLineEdit->setEnabled(true); | 145 | mNameLineEdit->setEnabled(true); |
146 | mEmailLineEdit->setEnabled(true); | 146 | mEmailLineEdit->setEnabled(true); |
147 | QString mail = item->text(1); | 147 | QString mail = item->text(1); |
148 | mNameLineEdit->setText(item->text(0)); | 148 | mNameLineEdit->setText(item->text(0)); |
149 | mEmailLineEdit->setText(mail); | 149 | mEmailLineEdit->setText(mail); |
150 | } | 150 | } |
151 | |||
152 | #include "publishdialog.moc" | ||