-rw-r--r-- | bin/kdepim/kaddressbook/germantranslation.txt | 4 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 17 |
3 files changed, 19 insertions, 4 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt index 7879194..e54e140 100644 --- a/bin/kdepim/kaddressbook/germantranslation.txt +++ b/bin/kdepim/kaddressbook/germantranslation.txt @@ -742,17 +742,21 @@ { "Writing file to disk...","Speichere Datei..." },
{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
{ "Synchronize!","Synchronisiere!" },
{ "High clock skew!","Großer Uhrzeitunterschied!" },
{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
{ "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" },
{ "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" },
{ "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" },
{ "Edit new contact","Bearbeite neuen Kontakt" },
{ "Edit ","Bearbeite " },
+{ "No contact changed!","Kein Kontakt verändert" },
+{ "%1 contacts changed!","%1 Kontakte geändert!" },
+{ "","" },
+{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
\ No newline at end of file diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index af76558..2bd9e71 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -192,25 +192,25 @@ bool ResourceFile::doOpen() if ( !file.exists() ) { // try to create the file bool ok = file.open( IO_WriteOnly ); if ( ok ) file.close(); return ok; } else { if ( !file.open( IO_ReadWrite ) ) return false; - if ( file.size() == 0 ) { + if ( file.size() < 10 ) { file.close(); return true; } bool ok = mFormat->checkFormat( &file ); file.close(); return ok; } } void ResourceFile::doClose() diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 20b107e..fa9f130 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -2430,51 +2430,62 @@ void KABCore::setFormattedName() { KABFormatPrefs setpref; if ( !setpref.exec() ) { return; } XXPortSelectDialog dlg( this, false, this ); if ( !dlg.exec() ) return; mAddressBook->setUntagged(); dlg.tagSelected(); int count = 0; KABC::AddressBook::Iterator it; + bool modified = false; for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { - if ( (*it).tagged() ) { + if ( (*it).tagged() ) { + if ( (*it).uid().left( 2 ) == "la" ) + if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) + continue; ++count; if ( count %10 == 0 ) message(i18n("Changing contact #%1").arg( count ) ); qApp->processEvents(); QString fName; if ( setpref.simple->isChecked() ) fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); else if ( setpref.full->isChecked() ) fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); else if ( setpref.reverse->isChecked() ) fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); else fName = (*it).organization(); if ( setpref.setCompany->isChecked() ) if ( fName.isEmpty() || fName =="," ) fName = (*it).organization(); (*it).setFormattedName( fName ); + (*it).setChanged( true ); + modified = true; + (*it).setRevision( QDateTime::currentDateTime() ); } } message(i18n("Refreshing view...") ); qApp->processEvents(); - mViewManager->refreshView( "" ); + if ( modified ) + setModified( true ); Addressee add; mDetails->setAddressee( add ); - message(i18n("Setting formatted name completed!") ); + if ( count == 0 ) + message(i18n("No contact changed!") ); + else + message(i18n("%1 contacts changed!").arg( count ) ); } void KABCore::clipboardDataChanged() { if ( mReadWrite ) mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); } void KABCore::updateActionMenu() { |