From ab7725c4517a1f6c145075edcff0bdafe105f0ea Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 09 Feb 2005 20:56:06 +0000 Subject: fixes --- (limited to 'libkdepim') diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index c8d0e0d..02e5587 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -1087,7 +1087,7 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) QTimer::singleShot( 1, this , SLOT ( readFileFromSocket())); } else if ( state == KCommandSocket::successW ) { - mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); + mParent->topLevelWidget()->setCaption( i18n("Pi-Sync successful!") ); mPisyncFinished = true; } @@ -1097,19 +1097,20 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) void KSyncManager::readFileFromSocket() { QString fileName = syncFileName(); + bool syncOK = true; mParent->topLevelWidget()->setCaption( i18n("Remote file saved to temp file.") ); if ( ! syncWithFile( fileName , true ) ) { mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") ); - mPisyncFinished = true; - return; + syncOK = false; } KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget() ); connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); - if ( mWriteBackFile ) + if ( mWriteBackFile && syncOK ) commandSocket->writeFile( fileName ); else { commandSocket->sendStop(); - mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); + if ( syncOK ) + mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); mPisyncFinished = true; } } @@ -1224,7 +1225,7 @@ void KServerSocket::send_file() if ( secs > 180 ) { if ( secs > 300 ) { - if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(0, i18n("The clocks of the syncing\ndevices have a difference\n of more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!<\b>\nPlease confirm synchronization!"), i18n("High clock skew!"),i18n("Synchronize!"))) { + if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(0, i18n("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!"), i18n("High clock skew!"),i18n("Synchronize!"))) { qDebug("KSS::Sync cancelled ,cs"); return ; } -- cgit v0.9.0.2