-rw-r--r-- | kaddressbook/kcmconfigs/addresseewidget.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/kaddressbook/kcmconfigs/addresseewidget.cpp b/kaddressbook/kcmconfigs/addresseewidget.cpp index eb5bdd9..168d39e 100644 --- a/kaddressbook/kcmconfigs/addresseewidget.cpp +++ b/kaddressbook/kcmconfigs/addresseewidget.cpp | |||
@@ -189,55 +189,50 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) | |||
189 | 189 | ||
190 | } | 190 | } |
191 | else | 191 | else |
192 | { | 192 | { |
193 | layout = new QGridLayout( this, 2, 3, KDialog::marginHint(), | 193 | layout = new QGridLayout( this, 2, 3, KDialog::marginHint(), |
194 | KDialog::spacingHint() ); | 194 | KDialog::spacingHint() ); |
195 | 195 | ||
196 | layout->addWidget( mPrefix, 0, 0 ); | 196 | layout->addWidget( mPrefix, 0, 0 ); |
197 | layout->addWidget( mInclusion, 0, 1 ); | 197 | layout->addWidget( mInclusion, 0, 1 ); |
198 | layout->addWidget( mSuffix, 0, 2 ); | 198 | layout->addWidget( mSuffix, 0, 2 ); |
199 | layout->addWidget( label, 1, 0 ); | 199 | layout->addWidget( label, 1, 0 ); |
200 | layout->addMultiCellWidget( mFormattedNameCombo, 1, 1, 1, 2 ); | 200 | layout->addMultiCellWidget( mFormattedNameCombo, 1, 1, 1, 2 ); |
201 | } | 201 | } |
202 | 202 | ||
203 | connect( mPrefix, SIGNAL( modified() ), SIGNAL( modified() ) ); | 203 | connect( mPrefix, SIGNAL( modified() ), SIGNAL( modified() ) ); |
204 | connect( mInclusion, SIGNAL( modified() ), SIGNAL( modified() ) ); | 204 | connect( mInclusion, SIGNAL( modified() ), SIGNAL( modified() ) ); |
205 | connect( mSuffix, SIGNAL( modified() ), SIGNAL( modified() ) ); | 205 | connect( mSuffix, SIGNAL( modified() ), SIGNAL( modified() ) ); |
206 | connect( mFormattedNameCombo, SIGNAL( activated( int ) ), SIGNAL( modified() ) ); | 206 | connect( mFormattedNameCombo, SIGNAL( activated( int ) ), SIGNAL( modified() ) ); |
207 | } | 207 | } |
208 | 208 | ||
209 | AddresseeWidget::~AddresseeWidget() | 209 | AddresseeWidget::~AddresseeWidget() |
210 | { | 210 | { |
211 | } | 211 | } |
212 | 212 | ||
213 | void AddresseeWidget::restoreSettings() | 213 | void AddresseeWidget::restoreSettings() |
214 | { | 214 | { |
215 | KConfig config( locateLocal("config", "kabcrc") ); | 215 | KConfig config( locateLocal("config", "kabcrc") ); |
216 | config.setGroup( "General" ); | 216 | config.setGroup( "General" ); |
217 | 217 | ||
218 | mPrefix->setNameParts( config.readListEntry( "Prefixes" ) ); | 218 | mPrefix->setNameParts( config.readListEntry( "Prefixes" ) ); |
219 | mInclusion->setNameParts( config.readListEntry( "Inclusions" ) ); | 219 | mInclusion->setNameParts( config.readListEntry( "Inclusions" ) ); |
220 | mSuffix->setNameParts( config.readListEntry( "Suffixes" ) ); | 220 | mSuffix->setNameParts( config.readListEntry( "Suffixes" ) ); |
221 | 221 | mFormattedNameCombo->setCurrentItem( config.readNumEntry( "FormattedNameType", 1 ) ); | |
222 | KConfig cfg( locateLocal("config","kaddressbookrc") ); | ||
223 | cfg.setGroup( "General" ); | ||
224 | mFormattedNameCombo->setCurrentItem( cfg.readNumEntry( "FormattedNameType", 1 ) ); | ||
225 | } | 222 | } |
226 | 223 | ||
227 | void AddresseeWidget::saveSettings() | 224 | void AddresseeWidget::saveSettings() |
228 | { | 225 | { |
226 | qDebug("AddresseeWidget::saveSettings() "); | ||
229 | KConfig config( locateLocal("config","kabcrc") ); | 227 | KConfig config( locateLocal("config","kabcrc") ); |
230 | config.setGroup( "General" ); | 228 | config.setGroup( "General" ); |
231 | 229 | ||
232 | config.writeEntry( "Prefixes", mPrefix->nameParts() ); | 230 | config.writeEntry( "Prefixes", mPrefix->nameParts() ); |
233 | config.writeEntry( "Inclusions", mInclusion->nameParts() ); | 231 | config.writeEntry( "Inclusions", mInclusion->nameParts() ); |
234 | config.writeEntry( "Suffixes", mSuffix->nameParts() ); | 232 | config.writeEntry( "Suffixes", mSuffix->nameParts() ); |
235 | 233 | config.writeEntry( "FormattedNameType", mFormattedNameCombo->currentItem() ); | |
236 | KConfig cfg( locateLocal("config","kaddressbookrc") ); | ||
237 | cfg.setGroup( "General" ); | ||
238 | cfg.writeEntry( "FormattedNameType", mFormattedNameCombo->currentItem() ); | ||
239 | } | 234 | } |
240 | 235 | ||
241 | #ifndef KAB_EMBEDDED | 236 | #ifndef KAB_EMBEDDED |
242 | #include "addresseewidget.moc" | 237 | #include "addresseewidget.moc" |
243 | #endif //KAB_EMBEDDED | 238 | #endif //KAB_EMBEDDED |