summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
authorzautrix <zautrix>2005-01-18 09:31:59 (UTC)
committer zautrix <zautrix>2005-01-18 09:31:59 (UTC)
commit2d6776d79732f6771885a549de5c37f9e75f7641 (patch) (side-by-side diff)
tree5dc2abf48a99e2a35f8e1458f731b3ef9210ac7e /kaddressbook/kabcore.cpp
parent522486966ecf041a6e49913b6e420d58d4284837 (diff)
downloadkdepimpi-2d6776d79732f6771885a549de5c37f9e75f7641.zip
kdepimpi-2d6776d79732f6771885a549de5c37f9e75f7641.tar.gz
kdepimpi-2d6776d79732f6771885a549de5c37f9e75f7641.tar.bz2
fixed merging
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp32
1 files changed, 21 insertions, 11 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 42e147f..d970ff1 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2353,17 +2353,27 @@ void KABCore::removeVoice()
{
if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No )
return;
- KABC::Addressee::List list;
XXPortSelectDialog dlg( this, false, this );
- if ( dlg.exec() )
- list = dlg.contacts();
- else
+ if ( !dlg.exec() )
return;
- KABC::Addressee::List::Iterator it;
- for ( it = list.begin(); it != list.end(); ++it ) {
- if ( (*it).removeVoice() )
- addrModified((*it), false );
+ mAddressBook->setUntagged();
+ dlg.tagSelected();
+ message(i18n("Removing voice..."), false );
+ KABC::AddressBook::Iterator it;
+ for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
+ if ( (*it).tagged() ) {
+ (*it).removeVoice();
+ }
}
+ message(i18n("Refreshing view...") );
+ qApp->processEvents();
+ mViewManager->refreshView( "" );
+ Addressee add;
+ mDetails->setAddressee( add );
+ message(i18n("Remove voice completed!") );
+
+
+
}
void KABCore::setFormattedName()
@@ -3131,7 +3141,7 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
AddressBook abLocal(filename,"syncContact");
bool syncOK = false;
if ( abLocal.load() ) {
- qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode );
+ qDebug("Sync:AB loaded %s,sync mode %d",filename.latin1(), mode );
bool external = false;
bool isXML = false;
if ( filename.right(4) == ".xml") {
@@ -3141,7 +3151,7 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
} else {
external = !manager->mIsKapiFile;
if ( external ) {
- qDebug("Setting vcf mode to external ");
+ qDebug("Sync:Setting vcf mode to external ");
mGlobalSyncMode = SYNC_MODE_EXTERNAL;
AddressBook::Iterator it;
for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
@@ -3161,7 +3171,7 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
{
if ( external )
abLocal.removeSyncAddressees( !isXML);
- qDebug("Saving remote AB ");
+ qDebug("Sync:Saving remote AB ");
if ( ! abLocal.saveAB())
qDebug("Error writing back AB to file ");
if ( external ) {