-rw-r--r-- | kaddressbook/kabcore.cpp | 52 |
1 files changed, 30 insertions, 22 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 9526f23..d393660 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -226,5 +226,6 @@ class KABFormatPrefs : public QDialog | |||
226 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 226 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
227 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 227 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
228 | resize( 200, 200 ); | 228 | //resize( 200, 200 ); |
229 | |||
229 | } | 230 | } |
230 | public: | 231 | public: |
@@ -1374,5 +1375,6 @@ void KABCore::save() | |||
1374 | "address book. Please check that some \nother application is " | 1375 | "address book. Please check that some \nother application is " |
1375 | "not using it. " ); | 1376 | "not using it. " ); |
1376 | message(i18n("Saving addressbook ... ")); | 1377 | message(i18n("Saving ... please wait! ")); |
1378 | qApp->processEvents(); | ||
1377 | #ifndef KAB_EMBEDDED | 1379 | #ifndef KAB_EMBEDDED |
1378 | KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); | 1380 | KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); |
@@ -2364,29 +2366,35 @@ void KABCore::setFormattedName() | |||
2364 | return; | 2366 | return; |
2365 | } | 2367 | } |
2366 | KABC::Addressee::List list; | ||
2367 | XXPortSelectDialog dlg( this, false, this ); | 2368 | XXPortSelectDialog dlg( this, false, this ); |
2368 | if ( dlg.exec() ) | 2369 | if ( !dlg.exec() ) |
2369 | list = dlg.contacts(); | ||
2370 | else | ||
2371 | return; | 2370 | return; |
2372 | KABC::Addressee::List::Iterator it; | 2371 | mAddressBook->setUntagged(); |
2373 | for ( it = list.begin(); it != list.end(); ++it ) { | 2372 | dlg.tagSelected(); |
2374 | QString fName; | 2373 | int count = 0; |
2375 | if ( setpref.simple->isChecked() ) | 2374 | KABC::AddressBook::Iterator it; |
2376 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); | 2375 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2377 | else if ( setpref.full->isChecked() ) | 2376 | if ( (*it).tagged() ) { |
2378 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); | 2377 | message(i18n("Changing contact #%1").arg( ++count ) ); |
2379 | else if ( setpref.reverse->isChecked() ) | 2378 | qApp->processEvents(); |
2380 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); | 2379 | QString fName; |
2381 | else | 2380 | if ( setpref.simple->isChecked() ) |
2382 | fName = (*it).organization(); | 2381 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); |
2383 | if ( setpref.setCompany->isChecked() ) | 2382 | else if ( setpref.full->isChecked() ) |
2384 | if ( fName.isEmpty() || fName =="," ) | 2383 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); |
2384 | else if ( setpref.reverse->isChecked() ) | ||
2385 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); | ||
2386 | else | ||
2385 | fName = (*it).organization(); | 2387 | fName = (*it).organization(); |
2386 | (*it).setFormattedName( fName ); | 2388 | if ( setpref.setCompany->isChecked() ) |
2387 | addrModified((*it),false ); | 2389 | if ( fName.isEmpty() || fName =="," ) |
2390 | fName = (*it).organization(); | ||
2391 | (*it).setFormattedName( fName ); | ||
2392 | } | ||
2388 | } | 2393 | } |
2394 | message(i18n("Refreshing view...") ); | ||
2395 | mViewManager->refreshView( "" ); | ||
2389 | Addressee add; | 2396 | Addressee add; |
2390 | mDetails->setAddressee( add ); | 2397 | mDetails->setAddressee( add ); |
2398 | message(i18n("Setting formatted name completed!") ); | ||
2391 | } | 2399 | } |
2392 | 2400 | ||
@@ -3207,5 +3215,5 @@ void KABCore::message( QString m ) | |||
3207 | { | 3215 | { |
3208 | topLevelWidget()->setCaption( m ); | 3216 | topLevelWidget()->setCaption( m ); |
3209 | mMessageTimer->start( 15000, true ); | 3217 | mMessageTimer->start( 20000, true ); |
3210 | } | 3218 | } |
3211 | bool KABCore::syncPhone() | 3219 | bool KABCore::syncPhone() |