-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 | |||
@@ -722,37 +722,41 @@ | |||
722 | { "Februar","Februar" }, | 722 | { "Februar","Februar" }, |
723 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 723 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
724 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 724 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
725 | { "Remote IP address:","Ferne IP Adresse:" }, | 725 | { "Remote IP address:","Ferne IP Adresse:" }, |
726 | { "Remote port number:","Ferne Port Nummer:" }, | 726 | { "Remote port number:","Ferne Port Nummer:" }, |
727 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 727 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
728 | { "Remote from: ","Fern von: " }, | 728 | { "Remote from: ","Fern von: " }, |
729 | { "Local from: ","Lokal von: " }, | 729 | { "Local from: ","Lokal von: " }, |
730 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, | 730 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, |
731 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 731 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
732 | { "Write back","Schreibe zurück" }, | 732 | { "Write back","Schreibe zurück" }, |
733 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 733 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
734 | { "Received sync request","Sync Anfrage erhalten" }, | 734 | { "Received sync request","Sync Anfrage erhalten" }, |
735 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, | 735 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, |
736 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 736 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
737 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 737 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
738 | { "Sending file...","Sende Datei..." }, | 738 | { "Sending file...","Sende Datei..." }, |
739 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 739 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
740 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 740 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
741 | { "Received %1 bytes","%1 Bytes erhalten" }, | 741 | { "Received %1 bytes","%1 Bytes erhalten" }, |
742 | { "Writing file to disk...","Speichere Datei..." }, | 742 | { "Writing file to disk...","Speichere Datei..." }, |
743 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 743 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
744 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 744 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
745 | { "Synchronize!","Synchronisiere!" }, | 745 | { "Synchronize!","Synchronisiere!" }, |
746 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 746 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
747 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 747 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
748 | { "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!" }, | 748 | { "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!" }, |
749 | { "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" }, | 749 | { "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" }, |
750 | { "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" }, | 750 | { "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" }, |
751 | { "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" }, | 751 | { "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" }, |
752 | { "Edit new contact","Bearbeite neuen Kontakt" }, | 752 | { "Edit new contact","Bearbeite neuen Kontakt" }, |
753 | { "Edit ","Bearbeite " }, | 753 | { "Edit ","Bearbeite " }, |
754 | { "No contact changed!","Kein Kontakt verändert" }, | ||
755 | { "%1 contacts changed!","%1 Kontakte geändert!" }, | ||
756 | { "","" }, | ||
757 | { "","" }, | ||
754 | { "","" }, | 758 | { "","" }, |
755 | { "","" }, | 759 | { "","" }, |
756 | { "","" }, | 760 | { "","" }, |
757 | { "","" }, | 761 | { "","" }, |
758 | { "","" }, \ No newline at end of file | 762 | { "","" }, \ 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 | |||
@@ -172,65 +172,65 @@ void ResourceFile::writeConfig( KConfig *config ) | |||
172 | Ticket *ResourceFile::requestSaveTicket() | 172 | Ticket *ResourceFile::requestSaveTicket() |
173 | { | 173 | { |
174 | kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl; | 174 | kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl; |
175 | 175 | ||
176 | if ( !addressBook() ) return 0; | 176 | if ( !addressBook() ) return 0; |
177 | 177 | ||
178 | #ifdef ALLOW_LOCKING | 178 | #ifdef ALLOW_LOCKING |
179 | if ( !lock( mFileName ) ) { | 179 | if ( !lock( mFileName ) ) { |
180 | qDebug("unablt to lock file "); | 180 | qDebug("unablt to lock file "); |
181 | return 0; | 181 | return 0; |
182 | } | 182 | } |
183 | #endif | 183 | #endif |
184 | return createTicket( this ); | 184 | return createTicket( this ); |
185 | } | 185 | } |
186 | 186 | ||
187 | 187 | ||
188 | bool ResourceFile::doOpen() | 188 | bool ResourceFile::doOpen() |
189 | { | 189 | { |
190 | QFile file( fileName() ); | 190 | QFile file( fileName() ); |
191 | qDebug("ResourceFile::openfile %s ", fileName().latin1()); | 191 | qDebug("ResourceFile::openfile %s ", fileName().latin1()); |
192 | 192 | ||
193 | if ( !file.exists() ) { | 193 | if ( !file.exists() ) { |
194 | // try to create the file | 194 | // try to create the file |
195 | bool ok = file.open( IO_WriteOnly ); | 195 | bool ok = file.open( IO_WriteOnly ); |
196 | if ( ok ) | 196 | if ( ok ) |
197 | file.close(); | 197 | file.close(); |
198 | 198 | ||
199 | return ok; | 199 | return ok; |
200 | } else { | 200 | } else { |
201 | if ( !file.open( IO_ReadWrite ) ) | 201 | if ( !file.open( IO_ReadWrite ) ) |
202 | return false; | 202 | return false; |
203 | 203 | ||
204 | if ( file.size() == 0 ) { | 204 | if ( file.size() < 10 ) { |
205 | file.close(); | 205 | file.close(); |
206 | return true; | 206 | return true; |
207 | } | 207 | } |
208 | 208 | ||
209 | bool ok = mFormat->checkFormat( &file ); | 209 | bool ok = mFormat->checkFormat( &file ); |
210 | file.close(); | 210 | file.close(); |
211 | 211 | ||
212 | return ok; | 212 | return ok; |
213 | } | 213 | } |
214 | } | 214 | } |
215 | 215 | ||
216 | void ResourceFile::doClose() | 216 | void ResourceFile::doClose() |
217 | { | 217 | { |
218 | } | 218 | } |
219 | 219 | ||
220 | bool ResourceFile::load() | 220 | bool ResourceFile::load() |
221 | { | 221 | { |
222 | 222 | ||
223 | QFile file( fileName() ); | 223 | QFile file( fileName() ); |
224 | if ( !file.open( IO_ReadOnly ) ) { | 224 | if ( !file.open( IO_ReadOnly ) ) { |
225 | addressBook()->error( i18n( "Unable to open file '%1'." ).arg( fileName() ) ); | 225 | addressBook()->error( i18n( "Unable to open file '%1'." ).arg( fileName() ) ); |
226 | return false; | 226 | return false; |
227 | } | 227 | } |
228 | 228 | ||
229 | // qDebug("ResourceFile::load format %s, %s", mFileName.latin1(), mFormatName.latin1()); | 229 | // qDebug("ResourceFile::load format %s, %s", mFileName.latin1(), mFormatName.latin1()); |
230 | 230 | ||
231 | return mFormat->loadAll( addressBook(), this, &file ); | 231 | return mFormat->loadAll( addressBook(), this, &file ); |
232 | } | 232 | } |
233 | 233 | ||
234 | bool ResourceFile::save( Ticket *ticket ) | 234 | bool ResourceFile::save( Ticket *ticket ) |
235 | { | 235 | { |
236 | // qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1()); | 236 | // qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1()); |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 20b107e..fa9f130 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2410,91 +2410,102 @@ void KABCore::removeVoice() | |||
2410 | dlg.tagSelected(); | 2410 | dlg.tagSelected(); |
2411 | message(i18n("Removing voice..."), false ); | 2411 | message(i18n("Removing voice..."), false ); |
2412 | KABC::AddressBook::Iterator it; | 2412 | KABC::AddressBook::Iterator it; |
2413 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2413 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2414 | if ( (*it).tagged() ) { | 2414 | if ( (*it).tagged() ) { |
2415 | (*it).removeVoice(); | 2415 | (*it).removeVoice(); |
2416 | } | 2416 | } |
2417 | } | 2417 | } |
2418 | message(i18n("Refreshing view...") ); | 2418 | message(i18n("Refreshing view...") ); |
2419 | qApp->processEvents(); | 2419 | qApp->processEvents(); |
2420 | mViewManager->refreshView( "" ); | 2420 | mViewManager->refreshView( "" ); |
2421 | Addressee add; | 2421 | Addressee add; |
2422 | mDetails->setAddressee( add ); | 2422 | mDetails->setAddressee( add ); |
2423 | message(i18n("Remove voice completed!") ); | 2423 | message(i18n("Remove voice completed!") ); |
2424 | 2424 | ||
2425 | 2425 | ||
2426 | 2426 | ||
2427 | } | 2427 | } |
2428 | 2428 | ||
2429 | void KABCore::setFormattedName() | 2429 | void KABCore::setFormattedName() |
2430 | { | 2430 | { |
2431 | KABFormatPrefs setpref; | 2431 | KABFormatPrefs setpref; |
2432 | if ( !setpref.exec() ) { | 2432 | if ( !setpref.exec() ) { |
2433 | return; | 2433 | return; |
2434 | } | 2434 | } |
2435 | XXPortSelectDialog dlg( this, false, this ); | 2435 | XXPortSelectDialog dlg( this, false, this ); |
2436 | if ( !dlg.exec() ) | 2436 | if ( !dlg.exec() ) |
2437 | return; | 2437 | return; |
2438 | mAddressBook->setUntagged(); | 2438 | mAddressBook->setUntagged(); |
2439 | dlg.tagSelected(); | 2439 | dlg.tagSelected(); |
2440 | int count = 0; | 2440 | int count = 0; |
2441 | KABC::AddressBook::Iterator it; | 2441 | KABC::AddressBook::Iterator it; |
2442 | bool modified = false; | ||
2442 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2443 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2443 | if ( (*it).tagged() ) { | 2444 | if ( (*it).tagged() ) { |
2445 | if ( (*it).uid().left( 2 ) == "la" ) | ||
2446 | if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) | ||
2447 | continue; | ||
2444 | ++count; | 2448 | ++count; |
2445 | if ( count %10 == 0 ) | 2449 | if ( count %10 == 0 ) |
2446 | message(i18n("Changing contact #%1").arg( count ) ); | 2450 | message(i18n("Changing contact #%1").arg( count ) ); |
2447 | qApp->processEvents(); | 2451 | qApp->processEvents(); |
2448 | QString fName; | 2452 | QString fName; |
2449 | if ( setpref.simple->isChecked() ) | 2453 | if ( setpref.simple->isChecked() ) |
2450 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); | 2454 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); |
2451 | else if ( setpref.full->isChecked() ) | 2455 | else if ( setpref.full->isChecked() ) |
2452 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); | 2456 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); |
2453 | else if ( setpref.reverse->isChecked() ) | 2457 | else if ( setpref.reverse->isChecked() ) |
2454 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); | 2458 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); |
2455 | else | 2459 | else |
2456 | fName = (*it).organization(); | 2460 | fName = (*it).organization(); |
2457 | if ( setpref.setCompany->isChecked() ) | 2461 | if ( setpref.setCompany->isChecked() ) |
2458 | if ( fName.isEmpty() || fName =="," ) | 2462 | if ( fName.isEmpty() || fName =="," ) |
2459 | fName = (*it).organization(); | 2463 | fName = (*it).organization(); |
2460 | (*it).setFormattedName( fName ); | 2464 | (*it).setFormattedName( fName ); |
2465 | (*it).setChanged( true ); | ||
2466 | modified = true; | ||
2467 | (*it).setRevision( QDateTime::currentDateTime() ); | ||
2461 | } | 2468 | } |
2462 | } | 2469 | } |
2463 | message(i18n("Refreshing view...") ); | 2470 | message(i18n("Refreshing view...") ); |
2464 | qApp->processEvents(); | 2471 | qApp->processEvents(); |
2465 | mViewManager->refreshView( "" ); | 2472 | if ( modified ) |
2473 | setModified( true ); | ||
2466 | Addressee add; | 2474 | Addressee add; |
2467 | mDetails->setAddressee( add ); | 2475 | mDetails->setAddressee( add ); |
2468 | message(i18n("Setting formatted name completed!") ); | 2476 | if ( count == 0 ) |
2477 | message(i18n("No contact changed!") ); | ||
2478 | else | ||
2479 | message(i18n("%1 contacts changed!").arg( count ) ); | ||
2469 | } | 2480 | } |
2470 | 2481 | ||
2471 | void KABCore::clipboardDataChanged() | 2482 | void KABCore::clipboardDataChanged() |
2472 | { | 2483 | { |
2473 | 2484 | ||
2474 | if ( mReadWrite ) | 2485 | if ( mReadWrite ) |
2475 | mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); | 2486 | mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); |
2476 | 2487 | ||
2477 | } | 2488 | } |
2478 | 2489 | ||
2479 | void KABCore::updateActionMenu() | 2490 | void KABCore::updateActionMenu() |
2480 | { | 2491 | { |
2481 | UndoStack *undo = UndoStack::instance(); | 2492 | UndoStack *undo = UndoStack::instance(); |
2482 | RedoStack *redo = RedoStack::instance(); | 2493 | RedoStack *redo = RedoStack::instance(); |
2483 | 2494 | ||
2484 | if ( undo->isEmpty() ) | 2495 | if ( undo->isEmpty() ) |
2485 | mActionUndo->setText( i18n( "Undo" ) ); | 2496 | mActionUndo->setText( i18n( "Undo" ) ); |
2486 | else | 2497 | else |
2487 | mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); | 2498 | mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); |
2488 | 2499 | ||
2489 | mActionUndo->setEnabled( !undo->isEmpty() ); | 2500 | mActionUndo->setEnabled( !undo->isEmpty() ); |
2490 | 2501 | ||
2491 | if ( !redo->top() ) | 2502 | if ( !redo->top() ) |
2492 | mActionRedo->setText( i18n( "Redo" ) ); | 2503 | mActionRedo->setText( i18n( "Redo" ) ); |
2493 | else | 2504 | else |
2494 | mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); | 2505 | mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); |
2495 | 2506 | ||
2496 | mActionRedo->setEnabled( !redo->isEmpty() ); | 2507 | mActionRedo->setEnabled( !redo->isEmpty() ); |
2497 | } | 2508 | } |
2498 | 2509 | ||
2499 | void KABCore::configureKeyBindings() | 2510 | void KABCore::configureKeyBindings() |
2500 | { | 2511 | { |