Diffstat (limited to 'kaddressbook/emaileditwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/emaileditwidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kaddressbook/emaileditwidget.cpp b/kaddressbook/emaileditwidget.cpp index 0e01b02..e72face 100644 --- a/kaddressbook/emaileditwidget.cpp +++ b/kaddressbook/emaileditwidget.cpp | |||
@@ -180,24 +180,25 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent, | |||
180 | qDebug("EmailEditDialog::EmailEditDialog has to be changed (lowPrio)"); | 180 | qDebug("EmailEditDialog::EmailEditDialog has to be changed (lowPrio)"); |
181 | //US must be fixed !!! | 181 | //US must be fixed !!! |
182 | /* | 182 | /* |
183 | if ( items.remove( "" ) > 0 ) | 183 | if ( items.remove( "" ) > 0 ) |
184 | mChanged = true; | 184 | mChanged = true; |
185 | else | 185 | else |
186 | mChanged = false; | 186 | mChanged = false; |
187 | */ | 187 | */ |
188 | 188 | ||
189 | mEmailListBox->insertStringList( items ); | 189 | mEmailListBox->insertStringList( items ); |
190 | // set default state | 190 | // set default state |
191 | selectionChanged( -1 ); | 191 | selectionChanged( -1 ); |
192 | mEmailEdit->setFocus(); | ||
192 | 193 | ||
193 | #ifndef KAB_EMBEDDED | 194 | #ifndef KAB_EMBEDDED |
194 | KAcceleratorManager::manage( this ); | 195 | KAcceleratorManager::manage( this ); |
195 | #else //KAB_EMBEDDED | 196 | #else //KAB_EMBEDDED |
196 | //US qDebug("EmailEditDialog::EmailEditDialog has to be changed"); | 197 | //US qDebug("EmailEditDialog::EmailEditDialog has to be changed"); |
197 | #endif //KAB_EMBEDDED | 198 | #endif //KAB_EMBEDDED |
198 | 199 | ||
199 | } | 200 | } |
200 | 201 | ||
201 | EmailEditDialog::~EmailEditDialog() | 202 | EmailEditDialog::~EmailEditDialog() |
202 | { | 203 | { |
203 | } | 204 | } |
@@ -216,24 +217,25 @@ void EmailEditDialog::add() | |||
216 | { | 217 | { |
217 | mEmailListBox->insertItem( mEmailEdit->text() ); | 218 | mEmailListBox->insertItem( mEmailEdit->text() ); |
218 | 219 | ||
219 | mEmailEdit->clear(); | 220 | mEmailEdit->clear(); |
220 | mEmailEdit->setFocus(); | 221 | mEmailEdit->setFocus(); |
221 | 222 | ||
222 | mChanged = true; | 223 | mChanged = true; |
223 | } | 224 | } |
224 | 225 | ||
225 | void EmailEditDialog::edit() | 226 | void EmailEditDialog::edit() |
226 | { | 227 | { |
227 | mEmailEdit->setText( mEmailListBox->currentText() ); | 228 | mEmailEdit->setText( mEmailListBox->currentText() ); |
229 | mEmailListBox->removeItem( mEmailListBox->currentItem() ); | ||
228 | mEmailEdit->setFocus(); | 230 | mEmailEdit->setFocus(); |
229 | } | 231 | } |
230 | 232 | ||
231 | void EmailEditDialog::remove() | 233 | void EmailEditDialog::remove() |
232 | { | 234 | { |
233 | QString address = mEmailListBox->currentText(); | 235 | QString address = mEmailListBox->currentText(); |
234 | 236 | ||
235 | QString text = i18n( "<qt>Are you sure that you want to remove the email address <b>%1</b>?</qt>" ).arg( address ); | 237 | QString text = i18n( "<qt>Are you sure that you want to remove the email address <b>%1</b>?</qt>" ).arg( address ); |
236 | QString caption = i18n( "Confirm Remove" ); | 238 | QString caption = i18n( "Confirm Remove" ); |
237 | 239 | ||
238 | if ( KMessageBox::questionYesNo( this, text, caption ) == KMessageBox::Yes ) { | 240 | if ( KMessageBox::questionYesNo( this, text, caption ) == KMessageBox::Yes ) { |
239 | mEmailListBox->removeItem( mEmailListBox->currentItem() ); | 241 | mEmailListBox->removeItem( mEmailListBox->currentItem() ); |