-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 37e3a54..d14ac51 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -626,50 +626,51 @@ void ContactEditor::init() { this, SLOT(slotZipChange(const QString &)) ); connect( cmbCountry, SIGNAL(textChanged(const QString &)), this, SLOT(slotCountryChange(const QString &)) ); connect( cmbCountry, SIGNAL(activated(const QString &)), this, SLOT(slotCountryChange(const QString &)) ); connect( cmbChooserField1, SIGNAL(activated(int)), this, SLOT(slotCmbChooser1Change(int)) ); connect( cmbChooserField2, SIGNAL(activated(int)), this, SLOT(slotCmbChooser2Change(int)) ); connect( cmbChooserField3, SIGNAL(activated(int)), this, SLOT(slotCmbChooser3Change(int)) ); connect( cmbChooserField4, SIGNAL(activated(int)), this, SLOT(slotCmbChooser4Change(int)) ); connect( cmbAddress, SIGNAL(activated(int)), this, SLOT(slotAddressTypeChange(int)) ); new QPEDialogListener(this); setPersonalView ( m_personalView ); } void ContactEditor::defaultEmailChanged(int i){ qDebug("defaultEmailChanged"); - int index = cmbChooserField1->currentItem(); - slChooserValues[index] = cmbDefaultEmail->text(i); + // was sollte das ? (se) +// int index = cmbChooserField1->currentItem(); +// slChooserValues[index] = cmbDefaultEmail->text(i); defaultEmail = cmbDefaultEmail->text(i); qDebug ("Changed to: %s", defaultEmail.latin1()); } void ContactEditor::populateDefaultEmailCmb(){ // if the default-email combo was not selected and therfore not created // we get a lot of trouble.. Therfore create an invisible one.. if ( !cmbDefaultEmail ){ cmbDefaultEmail = new QComboBox(this); cmbDefaultEmail -> hide(); } cmbDefaultEmail->clear(); cmbDefaultEmail->insertStringList( emails ); // cmbDefaultEmail->show(); // Select default email in combo.. bool found = false; for ( int i = 0; i < cmbDefaultEmail->count(); i++){ qDebug(" populateDefaultEmailCmb text >%s< defaultEmail >%s<", cmbDefaultEmail->text( i ).latin1(), defaultEmail.latin1()); @@ -878,49 +879,48 @@ void ContactEditor::slotStateChange( const QString &textChanged ) { } } void ContactEditor::slotZipChange( const QString &textChanged ) { if ( cmbAddress->currentItem() == 0 ) { slBusinessAddress[5] = textChanged; } else { slHomeAddress[5] = textChanged; } } void ContactEditor::slotCountryChange( const QString &textChanged ) { if ( cmbAddress->currentItem() == 0 ) { slBusinessAddress[6] = textChanged; } else { slHomeAddress[6] = textChanged; } } void ContactEditor::slotCmbChooser1Change( int index ) { qWarning("ContactEditor::slotCmbChooser1Change( %d )", index); - if ( !cmbChooserChange( cmbChooserField1->currentItem(), txtChooserField1, 1) ){ txtChooserField1->setText( slChooserValues[index] ); txtChooserField1->setFocus(); } } void ContactEditor::slotCmbChooser2Change( int index ) { qWarning("ContactEditor::slotCmbChooser2Change( %d )", index); if ( !cmbChooserChange( cmbChooserField2->currentItem(), txtChooserField2, 2) ){ txtChooserField2->setText( slChooserValues[index] ); txtChooserField2->setFocus(); } } void ContactEditor::slotCmbChooser3Change( int index ) { qWarning("ContactEditor::slotCmbChooser3Change( %d )", index); if ( !cmbChooserChange( cmbChooserField3->currentItem(), txtChooserField3, 3) ){ @@ -1462,48 +1462,49 @@ void ContactEditor::setEntry( const OContact &entry ) { slotAddressTypeChange( cmbAddress->currentItem() ); // loadFields(); :SX updateDatePicker(); } void ContactEditor::updateDatePicker() { // Set DatePicker if ( !ent.birthday().isNull() ){ birthdayButton->setText( TimeString::numberDateString( ent.birthday() ) ); birthdayPicker->setDate( ent.birthday() ); } else birthdayButton->setText( tr ("Unknown") ); if ( !ent.anniversary().isNull() ){ anniversaryButton->setText( TimeString::numberDateString( ent.anniversary() ) ); anniversaryPicker->setDate( ent.anniversary() ); } else anniversaryButton->setText( tr ("Unknown") ); } void ContactEditor::saveEntry() { + if ( useFullName ) { txtFirstName->setText( parseName( txtFullName->text(), NAME_F ) ); txtMiddleName->setText( parseName( txtFullName->text(), NAME_M ) ); txtLastName->setText( parseName( txtFullName->text(), NAME_L ) ); txtSuffix->setText( parseName( txtFullName->text(), NAME_S ) ); useFullName = false; } ent.setFirstName( txtFirstName->text() ); ent.setLastName( txtLastName->text() ); ent.setMiddleName( txtMiddleName->text() ); ent.setSuffix( txtSuffix->text() ); ent.setFileAs( cmbFileAs->currentText() ); ent.setCategories( cmbCat->currentCategories() ); //if (hasTitle) ent.setJobTitle( txtJobTitle->text() ); //if (hasCompany) ent.setCompany( txtOrganization->text() ); |