summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-07 11:44:35 (UTC)
committer zautrix <zautrix>2004-10-07 11:44:35 (UTC)
commit43c82cc5393522d2c34f34a4339cb6a1d1c6c555 (patch) (unidiff)
tree49916cfb6f12c846fa52f9697f9b0285c2902772
parentf0e8b8f36bccda952fa662e4faf2d58fcee67262 (diff)
downloadkdepimpi-43c82cc5393522d2c34f34a4339cb6a1d1c6c555.zip
kdepimpi-43c82cc5393522d2c34f34a4339cb6a1d1c6c555.tar.gz
kdepimpi-43c82cc5393522d2c34f34a4339cb6a1d1c6c555.tar.bz2
sync fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp12
-rw-r--r--kaddressbook/kabcore.h1
-rw-r--r--libkdepim/ksyncmanager.cpp75
-rw-r--r--libkdepim/ksyncmanager.h4
-rw-r--r--libkdepim/ksyncprefsdialog.cpp6
5 files changed, 42 insertions, 56 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 6404410..fa80f5c 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2860,2 +2860,4 @@ void KABCore::getFile( bool success )
2860{ 2860{
2861 qDebug("KABCore::getFile ");
2862 QTimer::singleShot( 15000, this , SLOT ( setCaptionBack()));
2861 if ( ! success ) { 2863 if ( ! success ) {
@@ -2865,3 +2867,3 @@ void KABCore::getFile( bool success )
2865 mAddressBook->importFromFile( sentSyncFile() ); 2867 mAddressBook->importFromFile( sentSyncFile() );
2866 setCaption( i18n("Pi-Sync successful!") ); 2868 topLevelWidget()->setCaption( i18n("Pi-Sync successful!") );
2867} 2869}
@@ -2874,5 +2876,5 @@ QString KABCore::sentSyncFile()
2874#ifdef _WIN32_ 2876#ifdef _WIN32_
2875 return locateLocal( "tmp", "syncab.ics" ); 2877 return locateLocal( "tmp", "copysyncab.vcf" );
2876#else 2878#else
2877 return QString( "/tmp/kapitempfile.vcf" ); 2879 return QString( "/tmp/copysyncab.vcf" );
2878#endif 2880#endif
@@ -2880,2 +2882,6 @@ QString KABCore::sentSyncFile()
2880 2882
2883void KABCore::setCaptionBack()
2884{
2885 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") );
2886}
2881 2887
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index 987369d..c628399 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -351,2 +351,3 @@ class KABCore : public QWidget, public KSyncInterface
351 void setJumpButtonBarVisible( bool visible ); 351 void setJumpButtonBarVisible( bool visible );
352 void setCaptionBack();
352 void importFromOL(); 353 void importFromOL();
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index b360644..a663427 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -233,3 +233,3 @@ void KSyncManager::slotSyncMenu( int action )
233 syncPi(); 233 syncPi();
234 } 234 } else
235 syncRemote( temp ); 235 syncRemote( temp );
@@ -351,5 +351,5 @@ bool KSyncManager::syncWithFile( QString fn , bool quick )
351 if ( ret = mImplementation->sync( this, fn, mSyncAlgoPrefs ) ) 351 if ( ret = mImplementation->sync( this, fn, mSyncAlgoPrefs ) )
352 mParent->setCaption( i18n("Synchronization successful") ); 352 mParent->topLevelWidget()->setCaption( i18n("Synchronization successful") );
353 else 353 else
354 mParent->setCaption( i18n("Sync cancelled or failed. Nothing synced.") ); 354 mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed. Nothing synced.") );
355 if ( ! quick ) 355 if ( ! quick )
@@ -378,3 +378,3 @@ void KSyncManager::multiSync( bool askforPrefs )
378 setBlockSave(false); 378 setBlockSave(false);
379 mParent->setCaption(i18n("Aborted! Nothing synced!")); 379 mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!"));
380 return; 380 return;
@@ -387,3 +387,3 @@ void KSyncManager::multiSync( bool askforPrefs )
387 } 387 }
388 mParent->setCaption(i18n("Multiple sync started.") ); 388 mParent->topLevelWidget()->setCaption(i18n("Multiple sync started.") );
389 qApp->processEvents(); 389 qApp->processEvents();
@@ -396,5 +396,5 @@ void KSyncManager::multiSync( bool askforPrefs )
396 if ( num ) 396 if ( num )
397 mParent->setCaption(i18n("%1 profiles synced. Multiple sync completed!").arg(num) ); 397 mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync completed!").arg(num) );
398 else 398 else
399 mParent->setCaption(i18n("Nothing synced! No profiles defined for multisync!")); 399 mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!"));
400 return; 400 return;
@@ -435,3 +435,3 @@ int KSyncManager::ringSync()
435 if ( includeInRingSync && ( i < 1 || i > 2 )) { 435 if ( includeInRingSync && ( i < 1 || i > 2 )) {
436 mParent->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); 436 mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... "));
437 ++syncedProfiles; 437 ++syncedProfiles;
@@ -480,3 +480,3 @@ int KSyncManager::ringSync()
480 timer.start(); 480 timer.start();
481 mParent->setCaption(i18n("Multiple sync in progress ... please wait!") ); 481 mParent->topLevelWidget()->setCaption(i18n("Multiple sync in progress ... please wait!") );
482 while ( timer.elapsed () < 2000 ) { 482 while ( timer.elapsed () < 2000 ) {
@@ -543,3 +543,3 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask)
543 maxlen += 25; 543 maxlen += 25;
544 mParent->setCaption ( i18n( "Copy remote file to local machine..." ) ); 544 mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) );
545 int fileSize = 0; 545 int fileSize = 0;
@@ -560,6 +560,6 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask)
560 i18n("Okay!")) ; 560 i18n("Okay!")) ;
561 mParent->setCaption (""); 561 mParent->topLevelWidget()->setCaption ("");
562 return; 562 return;
563 } 563 }
564 mParent->setCaption ( i18n( "Copying succeed." ) ); 564 mParent->topLevelWidget()->setCaption ( i18n( "Copying succeed." ) );
565 //qDebug(" file **%s** ",prof->getLocalTempFile().latin1() ); 565 //qDebug(" file **%s** ",prof->getLocalTempFile().latin1() );
@@ -580,3 +580,3 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask)
580 } 580 }
581 mParent->setCaption ( i18n( "Writing back file ..." ) ); 581 mParent->topLevelWidget()->setCaption ( i18n( "Writing back file ..." ) );
582 result = system ( postCommand ); 582 result = system ( postCommand );
@@ -584,6 +584,6 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask)
584 if ( result != 0 ) { 584 if ( result != 0 ) {
585 mParent->setCaption ( i18n( "Writing back file result: " )+QString::number( result ) ); 585 mParent->topLevelWidget()->setCaption ( i18n( "Writing back file result: " )+QString::number( result ) );
586 return; 586 return;
587 } else { 587 } else {
588 mParent->setCaption ( i18n( "Syncronization sucessfully completed" ) ); 588 mParent->topLevelWidget()->setCaption ( i18n( "Syncronization sucessfully completed" ) );
589 } 589 }
@@ -751,9 +751,9 @@ QString KSyncManager::syncFileName()
751 case (KAPI): 751 case (KAPI):
752 fn = "addressbook.vcf"; 752 fn = "tempsyncab.vcf";
753 break; 753 break;
754 case (KOPI): 754 case (KOPI):
755 fn = "synccalendar.ics"; 755 fn = "tempsynccal.ics";
756 break; 756 break;
757 case (PWMPI): 757 case (PWMPI):
758 fn = "manager.pwm"; 758 fn = "tempsyncpw.pwm";
759 break; 759 break;
@@ -775,3 +775,3 @@ void KSyncManager::syncPi()
775 if ( ! ok ) { 775 if ( ! ok ) {
776 mParent->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); 776 mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") );
777 return; 777 return;
@@ -780,3 +780,3 @@ void KSyncManager::syncPi()
780 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) ); 780 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) );
781 mParent->setCaption( i18n("Sending request for remote file ...") ); 781 mParent->topLevelWidget()->setCaption( i18n("Sending request for remote file ...") );
782 commandSocket->readFile( syncFileName() ); 782 commandSocket->readFile( syncFileName() );
@@ -790,3 +790,3 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state)
790 if ( state == KCommandSocket::errorR ) { 790 if ( state == KCommandSocket::errorR ) {
791 mParent->setCaption( i18n("ERROR: Receiving remote file failed.") ); 791 mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") );
792 delete s; 792 delete s;
@@ -798,3 +798,3 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state)
798 } else if ( state == KCommandSocket::errorW ) { 798 } else if ( state == KCommandSocket::errorW ) {
799 mParent->setCaption( i18n("ERROR:Writing back file failed.") ); 799 mParent->topLevelWidget()->setCaption( i18n("ERROR:Writing back file failed.") );
800 800
@@ -804,3 +804,3 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state)
804 } else if ( state == KCommandSocket::successW ) { 804 } else if ( state == KCommandSocket::successW ) {
805 mParent->setCaption( i18n("Pi-Sync succesful!") ); 805 mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") );
806 } 806 }
@@ -813,5 +813,5 @@ void KSyncManager::readFileFromSocket()
813 QString fileName = syncFileName(); 813 QString fileName = syncFileName();
814 mParent->setCaption( i18n("Remote file saved to temp file.") ); 814 mParent->topLevelWidget()->setCaption( i18n("Remote file saved to temp file.") );
815 if ( ! syncWithFile( fileName , true ) ) { 815 if ( ! syncWithFile( fileName , true ) ) {
816 mParent->setCaption( i18n("Syncing failed.") ); 816 mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") );
817 qDebug("Syncing failed "); 817 qDebug("Syncing failed ");
@@ -825,3 +825,3 @@ void KSyncManager::readFileFromSocket()
825 commandSocket->sendStop(); 825 commandSocket->sendStop();
826 mParent->setCaption( i18n("Pi-Sync succesful!") ); 826 mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") );
827 } 827 }
@@ -829,24 +829,2 @@ void KSyncManager::readFileFromSocket()
829 829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name ) 830KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name )
@@ -940,2 +918,3 @@ void KServerSocket::send_file()
940 mSyncActionDialog->show(); 918 mSyncActionDialog->show();
919 mSyncActionDialog->raise();
941 qDebug("KSS::saving ... "); 920 qDebug("KSS::saving ... ");
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 0eb3323..aad48d9 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -161,2 +161,4 @@ class KSyncManager : public QObject
161 void slotSyncMenu( int ); 161 void slotSyncMenu( int );
162 void deleteCommandSocket(KCommandSocket*s, int state);
163 void readFileFromSocket();
162 164
@@ -166,4 +168,2 @@ class KSyncManager : public QObject
166 void syncPi(); 168 void syncPi();
167 void deleteCommandSocket(KCommandSocket*s, int state);
168 void readFileFromSocket();
169 KServerSocket * mServerSocket; 169 KServerSocket * mServerSocket;
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 0caa27e..ee092b9 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -290,3 +290,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
290 290
291 lab = new QLabel( i18n("Password for remote access:"), piWidget); 291 lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget);
292 temphb = new QHBox( piWidget ); 292 temphb = new QHBox( piWidget );
@@ -296,3 +296,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
296 296
297 lab = new QLabel( i18n("Remote IP address:"), piWidget); 297 lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget);
298 temphb = new QHBox( piWidget ); 298 temphb = new QHBox( piWidget );
@@ -302,3 +302,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
302 302
303 lab = new QLabel( i18n("Remote port number:"), piWidget); 303 lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget);
304 temphb = new QHBox( piWidget ); 304 temphb = new QHBox( piWidget );