summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-12-02 08:29:35 (UTC)
committer zautrix <zautrix>2005-12-02 08:29:35 (UTC)
commit2bd8aff44e90b6d58e2037771db8b38846addb3e (patch) (unidiff)
tree63b679b438f2ad0daa4789de5e70a9f0eb5a8c9f
parent467b2e451511d201bfe9bef946728e5488d38e0a (diff)
downloadkdepimpi-2bd8aff44e90b6d58e2037771db8b38846addb3e.zip
kdepimpi-2bd8aff44e90b6d58e2037771db8b38846addb3e.tar.gz
kdepimpi-2bd8aff44e90b6d58e2037771db8b38846addb3e.tar.bz2
more sync
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt1
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--libkdepim/ksyncmanager.cpp9
-rw-r--r--libkdepim/ksyncprefsdialog.cpp1
4 files changed, 9 insertions, 4 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index e03dafb..2df2ac7 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -810,29 +810,30 @@
810{ "...and %1 more\ncontact(s) selected","...und noch %1 Kontakte\n mehr ausgewählt" }, 810{ "...and %1 more\ncontact(s) selected","...und noch %1 Kontakte\n mehr ausgewählt" },
811{ "Do you really\nwant to delete the\nsetected contact(s)?\n\n","Möchten Sie wirklich\ndie ausgewählten\nKontakte löschen?\n\n" }, 811{ "Do you really\nwant to delete the\nsetected contact(s)?\n\n","Möchten Sie wirklich\ndie ausgewählten\nKontakte löschen?\n\n" },
812{ "%1 contacts\nsuccessfully\nimported.","%1 Kontakte\nerfolgreich\nimportiert." }, 812{ "%1 contacts\nsuccessfully\nimported.","%1 Kontakte\nerfolgreich\nimportiert." },
813{ "Import this contact?","Importiere diesen Kontakt?" }, 813{ "Import this contact?","Importiere diesen Kontakt?" },
814{ "Import all!","Importiere alle!" }, 814{ "Import all!","Importiere alle!" },
815{ "Loading addressbook data ... please wait","Lade Adressbuchdaten ... bitte warten" }, 815{ "Loading addressbook data ... please wait","Lade Adressbuchdaten ... bitte warten" },
816{ "Import Format","Import Format" }, 816{ "Import Format","Import Format" },
817{ "Select import format!\nDefault and standard is Utf8.\nLatin1 may be the right\nfor some West Europian languages.","Wähle Import Format!\nDefault und Standard ist Utf8.\nLatin1 kann das richtige für\nWesteuropäische Sprachen sein." }, 817{ "Select import format!\nDefault and standard is Utf8.\nLatin1 may be the right\nfor some West Europian languages.","Wähle Import Format!\nDefault und Standard ist Utf8.\nLatin1 kann das richtige für\nWesteuropäische Sprachen sein." },
818{ "Home2","Privat2" }, 818{ "Home2","Privat2" },
819{ "Work2","Arbeit2" }, 819{ "Work2","Arbeit2" },
820{ "Fax (Work)","Fax (Arbeit)" }, 820{ "Fax (Work)","Fax (Arbeit)" },
821{ "Fax (Home)","Fax (Privat)" }, 821{ "Fax (Home)","Fax (Privat)" },
822{ "Assistent","Sekretär(in)" }, 822{ "Assistent","Sekretär(in)" },
823{ "Company","Firma" }, 823{ "Company","Firma" },
824{ "Mobile2","Handy2" }, 824{ "Mobile2","Handy2" },
825{ "Callback","Rückruf" }, 825{ "Callback","Rückruf" },
826{ "Fax (Other)","Fax (Sonst.)" }, 826{ "Fax (Other)","Fax (Sonst.)" },
827{ "Primary","Bevorzugt" }, 827{ "Primary","Bevorzugt" },
828{ "Mobile","Handy" }, 828{ "Mobile","Handy" },
829{ "Unfiled","Nicht zugeordnet" }, 829{ "Unfiled","Nicht zugeordnet" },
830{ "Format.n.:","Format.N.:" }, 830{ "Format.n.:","Format.N.:" },
831{ "Other Phone","Sonst. Telefon" }, 831{ "Other Phone","Sonst. Telefon" },
832{ "Pi-Sync - all calendars ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync - alle Kalender ( direktes Kx/Pi mit Kx/Pi syncen )" }, 832{ "Pi-Sync - all calendars ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync - alle Kalender ( direktes Kx/Pi mit Kx/Pi syncen )" },
833{ "Pi-Sync - selected calendars ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync - ausgewählte Kalender ( direktes Kx/Pi mit Kx/Pi syncen )" }, 833{ "Pi-Sync - selected calendars ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync - ausgewählte Kalender ( direktes Kx/Pi mit Kx/Pi syncen )" },
834{ "Waiting a second before syncing next resource...",""Warte eine Sekunde vor dem Syncen der nächsten resource..." },
834{ "","" }, 835{ "","" },
835{ "","" }, 836{ "","" },
836{ "","" }, 837{ "","" },
837{ "","" }, 838{ "","" },
838{ "","" }, \ No newline at end of file 839{ "","" }, \ No newline at end of file
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 2dec521..ba98b00 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1554,32 +1554,32 @@
1554{ "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" }, 1554{ "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" },
1555{ "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, 1555{ "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" },
1556{ "Conflict detection","Konflikterkennung" }, 1556{ "Conflict detection","Konflikterkennung" },
1557{ "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, 1557{ "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" },
1558{ "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." }, 1558{ "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." },
1559{ "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" }, 1559{ "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" },
1560{ "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, 1560{ "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." },
1561{ " Yes, close "," Ja, beenden " }, 1561{ " Yes, close "," Ja, beenden " },
1562{ "Export All Data","Exportiere alle Daten" }, 1562{ "Export All Data","Exportiere alle Daten" },
1563{ "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" }, 1563{ "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" },
1564{ "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" }, 1564{ "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" },
1565{ " (Duration: %1 days)"," (Dauer: %1 Tage)" }, 1565{ " (Duration: %1 days)"," (Dauer: %1 Tage)" },
1566{ "Autosave enabled!","Auto-Speichern angeschaltet!" }, 1566{ "Autosave enabled!","Auto-Speichern angeschaltet!" },
1567{ "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" }, 1567{ "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" },
1568{ "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" }, 1568{ "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" },
1569{ "Yes, Save!","Ja, Speichern!" }, 1569{ "Yes, Save!","Ja, Speichern!" },
1570{ "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" }, 1570{ "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" },
1571{ "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" }, 1571{ "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" },
1572{ "<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>","<br>Der Kalender enthält<br><b>%1 Termine<br>%2 Todos<br>%3 Journale</b>" }, 1572{ "<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>","<br>Der Kalender enthält<br><b>%1 Termine<br>%2 Todos<br>%3 Journale</b>" },
1573{ "Enable alarm in resource settings","Schalte Alarm in Resourcenansicht wieder an" }, 1573{ "Enable alarm in resource settings","Schalte Alarm in Resourcenansicht wieder an" },
1574{ "The alarm for this calendar\nis currently disabled!\nEnable it in resource settings.","Der Alarm für diesen Kalender\nist abgeschaltet.\nSchalten Sie ihn in der\nResourcenansicht ggf. an." }, 1574{ "The alarm for this calendar\nis currently disabled!\nEnable it in resource settings.","Der Alarm für diesen Kalender\nist abgeschaltet.\nSchalten Sie ihn in der\nResourcenansicht ggf. an." },
1575{ "Alarm disabled warning","Nichtaktiver Alarm" }, 1575{ "Alarm disabled warning","Nichtaktiver Alarm" },
1576{ "Pi-Sync - all calendars ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync - alle Kalender ( direktes Kx/Pi mit Kx/Pi syncen )" }, 1576{ "Pi-Sync - all calendars ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync - alle Kalender ( direktes Kx/Pi mit Kx/Pi syncen )" },
1577{ "Pi-Sync - selected calendars ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync - ausgewählte Kalender ( direktes Kx/Pi mit Kx/Pi syncen )" }, 1577{ "Pi-Sync - selected calendars ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync - ausgewählte Kalender ( direktes Kx/Pi mit Kx/Pi syncen )" },
1578{ "","" }, 1578{ "Waiting a second before syncing next resource...",""Warte eine Sekunde vor dem Syncen der nächsten resource..." },
1579{ "","" }, 1579{ "","" },
1580{ "","" }, 1580{ "","" },
1581{ "","" }, 1581{ "","" },
1582{ "","" }, 1582{ "","" },
1583{ "","" }, 1583{ "","" },
1584{ "","" }, 1584{ "","" },
1585{ "","" }, 1585{ "","" },
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 4d859ce..f80c2a6 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -297,48 +297,50 @@ void KSyncManager::slotSyncMenu( int action )
297 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB(); 297 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB();
298 break; 298 break;
299 case (KOPI): 299 case (KOPI):
300 if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 300 if ( syncWithFile( temp->getRemoteFileName( ), false ) )
301 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName(); 301 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName();
302 break; 302 break;
303 case (PWMPI): 303 case (PWMPI):
304 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) ) 304 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) )
305 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM(); 305 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM();
306 break; 306 break;
307 default: 307 default:
308 qDebug("KSM::slotSyncMenu: invalid apptype selected"); 308 qDebug("KSM::slotSyncMenu: invalid apptype selected");
309 break; 309 break;
310 310
311 } 311 }
312 } else { 312 } else {
313 if ( temp->getIsPhoneSync() ) { 313 if ( temp->getIsPhoneSync() ) {
314 mPhoneDevice = temp->getPhoneDevice( ) ; 314 mPhoneDevice = temp->getPhoneDevice( ) ;
315 mPhoneConnection = temp->getPhoneConnection( ); 315 mPhoneConnection = temp->getPhoneConnection( );
316 mPhoneModel = temp->getPhoneModel( ); 316 mPhoneModel = temp->getPhoneModel( );
317 syncPhone(); 317 syncPhone();
318 } else if ( temp->getIsPiSync()|| temp->getIsPiSyncSpec()) { 318 } else if ( temp->getIsPiSync()|| temp->getIsPiSyncSpec()) {
319 mSpecificResources.clear(); 319 mSpecificResources.clear();
320 if ( mTargetApp == KAPI ) { 320 if ( mTargetApp == KAPI ) {
321 if ( temp->getIsPiSyncSpec() )
322 mSpecificResources = QStringList::split( ":", temp->getResSpecKapi(),true );
321 mPassWordPiSync = temp->getRemotePwAB(); 323 mPassWordPiSync = temp->getRemotePwAB();
322 mActiveSyncPort = temp->getRemotePortAB(); 324 mActiveSyncPort = temp->getRemotePortAB();
323 mActiveSyncIP = temp->getRemoteIPAB(); 325 mActiveSyncIP = temp->getRemoteIPAB();
324 } else if ( mTargetApp == KOPI ) { 326 } else if ( mTargetApp == KOPI ) {
325 if ( temp->getIsPiSyncSpec() ) 327 if ( temp->getIsPiSyncSpec() )
326 mSpecificResources = QStringList::split( ":", temp->getResSpecKopi(),true ); 328 mSpecificResources = QStringList::split( ":", temp->getResSpecKopi(),true );
327 mPassWordPiSync = temp->getRemotePw(); 329 mPassWordPiSync = temp->getRemotePw();
328 mActiveSyncPort = temp->getRemotePort(); 330 mActiveSyncPort = temp->getRemotePort();
329 mActiveSyncIP = temp->getRemoteIP(); 331 mActiveSyncIP = temp->getRemoteIP();
330 } else { 332 } else {
331 mPassWordPiSync = temp->getRemotePwPWM(); 333 mPassWordPiSync = temp->getRemotePwPWM();
332 mActiveSyncPort = temp->getRemotePortPWM(); 334 mActiveSyncPort = temp->getRemotePortPWM();
333 mActiveSyncIP = temp->getRemoteIPPWM(); 335 mActiveSyncIP = temp->getRemoteIPPWM();
334 } 336 }
335 syncPi(); 337 syncPi();
336 while ( !mPisyncFinished ) { 338 while ( !mPisyncFinished ) {
337 //qDebug("waiting "); 339 //qDebug("waiting ");
338 qApp->processEvents(); 340 qApp->processEvents();
339 } 341 }
340 } else 342 } else
341 syncRemote( temp ); 343 syncRemote( temp );
342 344
343 } 345 }
344 } 346 }
@@ -639,52 +641,55 @@ int KSyncManager::ringSync()
639 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) ) 641 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) )
640 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB(); 642 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB();
641 break; 643 break;
642 case (KOPI): 644 case (KOPI):
643 if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 645 if ( syncWithFile( temp->getRemoteFileName( ), false ) )
644 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName(); 646 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName();
645 break; 647 break;
646 case (PWMPI): 648 case (PWMPI):
647 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) ) 649 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) )
648 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM(); 650 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM();
649 break; 651 break;
650 default: 652 default:
651 qDebug("KSM: invalid apptype selected"); 653 qDebug("KSM: invalid apptype selected");
652 break; 654 break;
653 } 655 }
654 } else { 656 } else {
655 if ( temp->getIsPhoneSync() ) { 657 if ( temp->getIsPhoneSync() ) {
656 mPhoneDevice = temp->getPhoneDevice( ) ; 658 mPhoneDevice = temp->getPhoneDevice( ) ;
657 mPhoneConnection = temp->getPhoneConnection( ); 659 mPhoneConnection = temp->getPhoneConnection( );
658 mPhoneModel = temp->getPhoneModel( ); 660 mPhoneModel = temp->getPhoneModel( );
659 syncPhone(); 661 syncPhone();
660 } else if ( temp->getIsPiSync() || temp->getIsPiSyncSpec()) { 662 } else if ( temp->getIsPiSync() || temp->getIsPiSyncSpec()) {
661 mSpecificResources.clear(); 663 mSpecificResources.clear();
662 if ( mTargetApp == KAPI ) { 664 if ( mTargetApp == KAPI ) {
665 if ( temp->getIsPiSyncSpec() )
666 mSpecificResources = QStringList::split( ":", temp->getResSpecKapi(),true );
663 mPassWordPiSync = temp->getRemotePwAB(); 667 mPassWordPiSync = temp->getRemotePwAB();
664 mActiveSyncPort = temp->getRemotePortAB(); 668 mActiveSyncPort = temp->getRemotePortAB();
665 mActiveSyncIP = temp->getRemoteIPAB(); 669 mActiveSyncIP = temp->getRemoteIPAB();
666 } else if ( mTargetApp == KOPI ) { 670 } else if ( mTargetApp == KOPI ) {
671 if ( temp->getIsPiSyncSpec() )
667 mSpecificResources = QStringList::split( ":", temp->getResSpecKopi(),true ); 672 mSpecificResources = QStringList::split( ":", temp->getResSpecKopi(),true );
668 mPassWordPiSync = temp->getRemotePw(); 673 mPassWordPiSync = temp->getRemotePw();
669 mActiveSyncPort = temp->getRemotePort(); 674 mActiveSyncPort = temp->getRemotePort();
670 mActiveSyncIP = temp->getRemoteIP(); 675 mActiveSyncIP = temp->getRemoteIP();
671 } else { 676 } else {
672 mPassWordPiSync = temp->getRemotePwPWM(); 677 mPassWordPiSync = temp->getRemotePwPWM();
673 mActiveSyncPort = temp->getRemotePortPWM(); 678 mActiveSyncPort = temp->getRemotePortPWM();
674 mActiveSyncIP = temp->getRemoteIPPWM(); 679 mActiveSyncIP = temp->getRemoteIPPWM();
675 } 680 }
676 syncPi(); 681 syncPi();
677 while ( !mPisyncFinished ) { 682 while ( !mPisyncFinished ) {
678 //qDebug("waiting "); 683 //qDebug("waiting ");
679 qApp->processEvents(); 684 qApp->processEvents();
680 } 685 }
681 timer.start(); 686 timer.start();
682 while ( timer.elapsed () < 2000 ) { 687 while ( timer.elapsed () < 2000 ) {
683 qApp->processEvents(); 688 qApp->processEvents();
684 } 689 }
685 } else 690 } else
686 syncRemote( temp, false ); 691 syncRemote( temp, false );
687 692
688 } 693 }
689 } 694 }
690 timer.start(); 695 timer.start();
@@ -1147,52 +1152,52 @@ void KSyncManager::syncPi()
1147 //qDebug ( "KSM: sync pi %d",ccc ); 1152 //qDebug ( "KSM: sync pi %d",ccc );
1148 } 1153 }
1149 uint startLocal = 0; 1154 uint startLocal = 0;
1150 uint startRemote = mSpecificResources.count()/2; 1155 uint startRemote = mSpecificResources.count()/2;
1151 emit multiResourceSyncStart( true ); 1156 emit multiResourceSyncStart( true );
1152 while ( startLocal < mSpecificResources.count()/2 ) { 1157 while ( startLocal < mSpecificResources.count()/2 ) {
1153 if ( startLocal+1 >= lastSyncRes ) 1158 if ( startLocal+1 >= lastSyncRes )
1154 emit multiResourceSyncStart( false ); 1159 emit multiResourceSyncStart( false );
1155 mPisyncFinished = false; 1160 mPisyncFinished = false;
1156 mCurrentResourceLocal = mSpecificResources[ startLocal ]; 1161 mCurrentResourceLocal = mSpecificResources[ startLocal ];
1157 mCurrentResourceRemote = mSpecificResources[ startRemote ]; 1162 mCurrentResourceRemote = mSpecificResources[ startRemote ];
1158 //qDebug ( "KSM: AAASyncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() ); 1163 //qDebug ( "KSM: AAASyncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() );
1159 if ( !mCurrentResourceRemote.isEmpty() ) { 1164 if ( !mCurrentResourceRemote.isEmpty() ) {
1160 qDebug ( "KSM: Syncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() ); 1165 qDebug ( "KSM: Syncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() );
1161 1166
1162 KCommandSocket* commandSocket = new KCommandSocket( mCurrentResourceRemote, mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); 1167 KCommandSocket* commandSocket = new KCommandSocket( mCurrentResourceRemote, mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() );
1163 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) ); 1168 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) );
1164 commandSocket->readFile( syncFileName() ); 1169 commandSocket->readFile( syncFileName() );
1165 mParent->topLevelWidget()->setCaption( i18n("Syncing %1 <-> %2").arg( mCurrentResourceLocal ).arg( mCurrentResourceRemote ) ); 1170 mParent->topLevelWidget()->setCaption( i18n("Syncing %1 <-> %2").arg( mCurrentResourceLocal ).arg( mCurrentResourceRemote ) );
1166 while ( !mPisyncFinished ) { 1171 while ( !mPisyncFinished ) {
1167 //qDebug("waiting "); 1172 //qDebug("waiting ");
1168 qApp->processEvents(); 1173 qApp->processEvents();
1169 } 1174 }
1170 if ( startLocal+1 < mSpecificResources.count()/2 ) { 1175 if ( startLocal+1 < mSpecificResources.count()/2 ) {
1171 mParent->topLevelWidget()->setCaption( i18n("Waiting 2 secs before syncing next resource...") ); 1176 mParent->topLevelWidget()->setCaption( i18n("Waiting a second before syncing next resource...") );
1172 QTime timer; 1177 QTime timer;
1173 timer.start(); 1178 timer.start();
1174 while ( timer.elapsed () < 2000 ) { 1179 while ( timer.elapsed () < 1000 ) {
1175 qApp->processEvents(); 1180 qApp->processEvents();
1176 } 1181 }
1177 } 1182 }
1178 } 1183 }
1179 ++startRemote; 1184 ++startRemote;
1180 ++startLocal; 1185 ++startLocal;
1181 mAskForPreferences = false; 1186 mAskForPreferences = false;
1182 } 1187 }
1183 mPisyncFinished = true; 1188 mPisyncFinished = true;
1184 } else { 1189 } else {
1185 KCommandSocket* commandSocket = new KCommandSocket( "", mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); 1190 KCommandSocket* commandSocket = new KCommandSocket( "", mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() );
1186 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) ); 1191 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) );
1187 commandSocket->readFile( syncFileName() ); 1192 commandSocket->readFile( syncFileName() );
1188 } 1193 }
1189} 1194}
1190 1195
1191void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) 1196void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state)
1192{ 1197{
1193 //enum { success, errorW, errorR, quiet }; 1198 //enum { success, errorW, errorR, quiet };
1194 1199
1195 1200
1196 1201
1197 if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ||state == KCommandSocket::errorPW || 1202 if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ||state == KCommandSocket::errorPW ||
1198 state == KCommandSocket::errorCA ||state == KCommandSocket::errorFI ||state == KCommandSocket::errorUN||state == KCommandSocket::errorED ) { 1203 state == KCommandSocket::errorCA ||state == KCommandSocket::errorFI ||state == KCommandSocket::errorUN||state == KCommandSocket::errorED ) {
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 6f46d19..2b87298 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -482,49 +482,48 @@ void KSyncPrefsDialog::accept()
482} 482}
483void KSyncPrefsDialog::chooseFile() 483void KSyncPrefsDialog::chooseFile()
484{ 484{
485 QString fn = QDir::homeDirPath(); 485 QString fn = QDir::homeDirPath();
486 486
487 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this ); 487 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this );
488 if ( fn == "" ) 488 if ( fn == "" )
489 return; 489 return;
490 mRemoteFile->setText( fn ); 490 mRemoteFile->setText( fn );
491} 491}
492 492
493void KSyncPrefsDialog::chooseFileAB() 493void KSyncPrefsDialog::chooseFileAB()
494{ 494{
495 QString fn = QDir::homeDirPath(); 495 QString fn = QDir::homeDirPath();
496 496
497 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this ); 497 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this );
498 if ( fn == "" ) 498 if ( fn == "" )
499 return; 499 return;
500 mRemoteFileAB->setText( fn ); 500 mRemoteFileAB->setText( fn );
501} 501}
502 502
503void KSyncPrefsDialog::chooseFilePWM() 503void KSyncPrefsDialog::chooseFilePWM()
504{ 504{
505 QString fn = QDir::homeDirPath(); 505 QString fn = QDir::homeDirPath();
506
507 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this ); 506 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this );
508 if ( fn == "" ) 507 if ( fn == "" )
509 return; 508 return;
510 mRemoteFilePWM->setText( fn ); 509 mRemoteFilePWM->setText( fn );
511} 510}
512void KSyncPrefsDialog::updateMyCaption() 511void KSyncPrefsDialog::updateMyCaption()
513{ 512{
514 setCaption( mProfileBox->currentText() + " : " +i18n("Synchronization Preferences")); 513 setCaption( mProfileBox->currentText() + " : " +i18n("Synchronization Preferences"));
515} 514}
516void KSyncPrefsDialog::textChanged( const QString & s ) 515void KSyncPrefsDialog::textChanged( const QString & s )
517{ 516{
518 if ( mProfileBox->count() == 0 ) 517 if ( mProfileBox->count() == 0 )
519 return; 518 return;
520 if ( currentSelection < 3 ) { 519 if ( currentSelection < 3 ) {
521 //KMessageBox::error(this,i18n("This profil name\ncannot be edited!\n"),i18n("KO/Pi config error")); 520 //KMessageBox::error(this,i18n("This profil name\ncannot be edited!\n"),i18n("KO/Pi config error"));
522 mProfileBox->blockSignals( true ); 521 mProfileBox->blockSignals( true );
523 mProfileBox->setCurrentItem(mProfileBox-> currentItem ()); 522 mProfileBox->setCurrentItem(mProfileBox-> currentItem ());
524 mProfileBox->blockSignals( false ); 523 mProfileBox->blockSignals( false );
525 return; 524 return;
526 } 525 }
527 //qDebug("cur i %d ",mProfileBox-> currentItem () ); 526 //qDebug("cur i %d ",mProfileBox-> currentItem () );
528 mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ; 527 mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ;
529 KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ; 528 KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ;
530 prof->setName( s ); 529 prof->setName( s );