summaryrefslogtreecommitdiffabout
path: root/kaddressbook/emaileditwidget.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/emaileditwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/emaileditwidget.cpp2
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,
qDebug("EmailEditDialog::EmailEditDialog has to be changed (lowPrio)");
//US must be fixed !!!
/*
if ( items.remove( "" ) > 0 )
mChanged = true;
else
mChanged = false;
*/
mEmailListBox->insertStringList( items );
// set default state
selectionChanged( -1 );
+ mEmailEdit->setFocus();
#ifndef KAB_EMBEDDED
KAcceleratorManager::manage( this );
#else //KAB_EMBEDDED
//US qDebug("EmailEditDialog::EmailEditDialog has to be changed");
#endif //KAB_EMBEDDED
}
EmailEditDialog::~EmailEditDialog()
{
}
@@ -216,24 +217,25 @@ void EmailEditDialog::add()
{
mEmailListBox->insertItem( mEmailEdit->text() );
mEmailEdit->clear();
mEmailEdit->setFocus();
mChanged = true;
}
void EmailEditDialog::edit()
{
mEmailEdit->setText( mEmailListBox->currentText() );
+ mEmailListBox->removeItem( mEmailListBox->currentItem() );
mEmailEdit->setFocus();
}
void EmailEditDialog::remove()
{
QString address = mEmailListBox->currentText();
QString text = i18n( "<qt>Are you sure that you want to remove the email address <b>%1</b>?</qt>" ).arg( address );
QString caption = i18n( "Confirm Remove" );
if ( KMessageBox::questionYesNo( this, text, caption ) == KMessageBox::Yes ) {
mEmailListBox->removeItem( mEmailListBox->currentItem() );