Diffstat (limited to 'kaddressbook/nameeditdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/nameeditdialog.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp index fb7eb22..8213c2b 100644 --- a/kaddressbook/nameeditdialog.cpp +++ b/kaddressbook/nameeditdialog.cpp @@ -80,65 +80,65 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, layout->addWidget( label, 2, 0 ); mAdditionalNameEdit = new KLineEdit( page ); label->setBuddy( mAdditionalNameEdit ); layout->addMultiCellWidget( mAdditionalNameEdit, 2, 2, 1, 2 ); label = new QLabel( i18n( "Family names:" ), page ); layout->addWidget( label, 3, 0 ); mFamilyNameEdit = new KLineEdit( page ); label->setBuddy( mFamilyNameEdit ); layout->addMultiCellWidget( mFamilyNameEdit, 3, 3, 1, 2 ); label = new QLabel( i18n( "Honorific suffixes:" ), page ); layout->addWidget( label, 4, 0 ); mSuffixCombo = new KComboBox( page ); mSuffixCombo->setDuplicatesEnabled( false ); mSuffixCombo->setEditable( true ); label->setBuddy( mSuffixCombo ); layout->addMultiCellWidget( mSuffixCombo, 4, 4, 1, 2 ); mFormattedNameCombo = new KComboBox( page ); mFormattedNameCombo->setMaximumWidth(100); layout->addMultiCellWidget( mFormattedNameCombo, 5, 5, 0, 0 ); connect( mFormattedNameCombo, SIGNAL( activated( int ) ), SLOT( typeChanged( int ) ) ); mFormattedNameEdit = new KLineEdit( page ); mFormattedNameEdit->setEnabled( type == CustomName ); layout->addMultiCellWidget( mFormattedNameEdit, 5, 5, 1, 2 ); mParseBox = new QCheckBox( i18n( "Parse name automatically" ), page ); connect( mParseBox, SIGNAL( toggled(bool) ), SLOT( parseBoxChanged(bool) ) ); connect( mParseBox, SIGNAL( toggled(bool) ), SLOT( modified() ) ); - layout->addMultiCellWidget( mParseBox, 6, 6, 0, 1 ); + layout->addMultiCellWidget( mParseBox, 6, 6, 0, 2 ); // Fill in the values mFamilyNameEdit->setText( addr.familyName() ); mGivenNameEdit->setText( addr.givenName() ); mAdditionalNameEdit->setText( addr.additionalName() ); mFormattedNameEdit->setText( addr.formattedName() ); // Prefix and suffix combos //US KConfig config( "kabcrc" ); KConfig config( locateLocal("config", "kabcrc") ); config.setGroup( "General" ); QStringList sTitle; sTitle += i18n( "Dr." ); sTitle += i18n( "Miss" ); sTitle += i18n( "Mr." ); sTitle += i18n( "Mrs." ); sTitle += i18n( "Ms." ); sTitle += i18n( "Prof." ); sTitle += config.readListEntry( "Prefixes" ); sTitle.sort(); QStringList sSuffix; sSuffix += i18n( "I" ); sSuffix += i18n( "II" ); sSuffix += i18n( "III" ); sSuffix += i18n( "Jr." ); sSuffix += i18n( "Sr." ); sSuffix += config.readListEntry( "Suffixes" ); sSuffix.sort(); mPrefixCombo->insertStringList( sTitle ); @@ -146,67 +146,64 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, #ifndef KAB_EMBEDDED mPrefixCombo->setCurrentText( addr.prefix() ); mSuffixCombo->setCurrentText( addr.suffix() ); #else //KAB_EMBEDDED mPrefixCombo->setEditText( addr.prefix() ); mSuffixCombo->setEditText( addr.suffix() ); #endif //KAB_EMBEDDED AddresseeConfig::instance()->setUid( addr.uid() ); mParseBox->setChecked( AddresseeConfig::instance()->automaticNameParsing() ); #ifndef KAB_EMBEDDED KAcceleratorManager::manage( this ); #endif //KAB_EMBEDDED connect( mPrefixCombo, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); connect( mPrefixCombo, SIGNAL( textChanged( const QString& ) ), SLOT( updateTypeCombo() ) ); connect( mGivenNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); connect( mGivenNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( updateTypeCombo() ) ); connect( mAdditionalNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); connect( mAdditionalNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( updateTypeCombo() ) ); connect( mFamilyNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); connect( mFamilyNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( updateTypeCombo() ) ); connect( mSuffixCombo, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); connect( mSuffixCombo, SIGNAL( textChanged( const QString& ) ), SLOT( updateTypeCombo() ) ); connect( mFormattedNameCombo, SIGNAL( activated( int ) ), SLOT( modified() ) ); connect( mFormattedNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); updateTypeCombo(); mFormattedNameCombo->setCurrentItem( type ); -#ifdef KAB_EMBEDDED - resize( KMIN(KGlobal::getDesktopWidth()-10, 490), KMIN(KGlobal::getDesktopHeight()-50, 300)); -#endif //KAB_EMBEDDED mChanged = false; } NameEditDialog::~NameEditDialog() { } QString NameEditDialog::familyName() const { return mFamilyNameEdit->text(); } QString NameEditDialog::givenName() const { return mGivenNameEdit->text(); } QString NameEditDialog::prefix() const { return mPrefixCombo->currentText(); } QString NameEditDialog::suffix() const { return mSuffixCombo->currentText(); } QString NameEditDialog::additionalName() const { return mAdditionalNameEdit->text(); } |