-rw-r--r-- | libkdepim/ksyncmanager.cpp | 75 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.h | 4 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 6 |
3 files changed, 32 insertions, 53 deletions
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 ) syncPi(); - } + } else syncRemote( temp ); @@ -351,5 +351,5 @@ bool KSyncManager::syncWithFile( QString fn , bool quick ) if ( ret = mImplementation->sync( this, fn, mSyncAlgoPrefs ) ) - mParent->setCaption( i18n("Synchronization successful") ); + mParent->topLevelWidget()->setCaption( i18n("Synchronization successful") ); else - mParent->setCaption( i18n("Sync cancelled or failed. Nothing synced.") ); + mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed. Nothing synced.") ); if ( ! quick ) @@ -378,3 +378,3 @@ void KSyncManager::multiSync( bool askforPrefs ) setBlockSave(false); - mParent->setCaption(i18n("Aborted! Nothing synced!")); + mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!")); return; @@ -387,3 +387,3 @@ void KSyncManager::multiSync( bool askforPrefs ) } - mParent->setCaption(i18n("Multiple sync started.") ); + mParent->topLevelWidget()->setCaption(i18n("Multiple sync started.") ); qApp->processEvents(); @@ -396,5 +396,5 @@ void KSyncManager::multiSync( bool askforPrefs ) if ( num ) - mParent->setCaption(i18n("%1 profiles synced. Multiple sync completed!").arg(num) ); + mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync completed!").arg(num) ); else - mParent->setCaption(i18n("Nothing synced! No profiles defined for multisync!")); + mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!")); return; @@ -435,3 +435,3 @@ int KSyncManager::ringSync() if ( includeInRingSync && ( i < 1 || i > 2 )) { - mParent->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); + mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); ++syncedProfiles; @@ -480,3 +480,3 @@ int KSyncManager::ringSync() timer.start(); - mParent->setCaption(i18n("Multiple sync in progress ... please wait!") ); + mParent->topLevelWidget()->setCaption(i18n("Multiple sync in progress ... please wait!") ); while ( timer.elapsed () < 2000 ) { @@ -543,3 +543,3 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask) maxlen += 25; - mParent->setCaption ( i18n( "Copy remote file to local machine..." ) ); + mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) ); int fileSize = 0; @@ -560,6 +560,6 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask) i18n("Okay!")) ; - mParent->setCaption (""); + mParent->topLevelWidget()->setCaption (""); return; } - mParent->setCaption ( i18n( "Copying succeed." ) ); + mParent->topLevelWidget()->setCaption ( i18n( "Copying succeed." ) ); //qDebug(" file **%s** ",prof->getLocalTempFile().latin1() ); @@ -580,3 +580,3 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask) } - mParent->setCaption ( i18n( "Writing back file ..." ) ); + mParent->topLevelWidget()->setCaption ( i18n( "Writing back file ..." ) ); result = system ( postCommand ); @@ -584,6 +584,6 @@ void KSyncManager::syncRemote( KSyncProfile* prof, bool ask) if ( result != 0 ) { - mParent->setCaption ( i18n( "Writing back file result: " )+QString::number( result ) ); + mParent->topLevelWidget()->setCaption ( i18n( "Writing back file result: " )+QString::number( result ) ); return; } else { - mParent->setCaption ( i18n( "Syncronization sucessfully completed" ) ); + mParent->topLevelWidget()->setCaption ( i18n( "Syncronization sucessfully completed" ) ); } @@ -751,9 +751,9 @@ QString KSyncManager::syncFileName() case (KAPI): - fn = "addressbook.vcf"; + fn = "tempsyncab.vcf"; break; case (KOPI): - fn = "synccalendar.ics"; + fn = "tempsynccal.ics"; break; case (PWMPI): - fn = "manager.pwm"; + fn = "tempsyncpw.pwm"; break; @@ -775,3 +775,3 @@ void KSyncManager::syncPi() if ( ! ok ) { - mParent->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); + mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); return; @@ -780,3 +780,3 @@ void KSyncManager::syncPi() connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) ); - mParent->setCaption( i18n("Sending request for remote file ...") ); + mParent->topLevelWidget()->setCaption( i18n("Sending request for remote file ...") ); commandSocket->readFile( syncFileName() ); @@ -790,3 +790,3 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) if ( state == KCommandSocket::errorR ) { - mParent->setCaption( i18n("ERROR: Receiving remote file failed.") ); + mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") ); delete s; @@ -798,3 +798,3 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) } else if ( state == KCommandSocket::errorW ) { - mParent->setCaption( i18n("ERROR:Writing back file failed.") ); + mParent->topLevelWidget()->setCaption( i18n("ERROR:Writing back file failed.") ); @@ -804,3 +804,3 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) } else if ( state == KCommandSocket::successW ) { - mParent->setCaption( i18n("Pi-Sync succesful!") ); + mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); } @@ -813,5 +813,5 @@ void KSyncManager::readFileFromSocket() QString fileName = syncFileName(); - mParent->setCaption( i18n("Remote file saved to temp file.") ); + mParent->topLevelWidget()->setCaption( i18n("Remote file saved to temp file.") ); if ( ! syncWithFile( fileName , true ) ) { - mParent->setCaption( i18n("Syncing failed.") ); + mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") ); qDebug("Syncing failed "); @@ -825,3 +825,3 @@ void KSyncManager::readFileFromSocket() commandSocket->sendStop(); - mParent->setCaption( i18n("Pi-Sync succesful!") ); + mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); } @@ -829,24 +829,2 @@ void KSyncManager::readFileFromSocket() - - - - - - - - - - - - - - - - - - - - - - KServerSocket:: 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() mSyncActionDialog->show(); + mSyncActionDialog->raise(); 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 void slotSyncMenu( int ); + void deleteCommandSocket(KCommandSocket*s, int state); + void readFileFromSocket(); @@ -166,4 +168,2 @@ class KSyncManager : public QObject void syncPi(); - void deleteCommandSocket(KCommandSocket*s, int state); - void readFileFromSocket(); 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() - lab = new QLabel( i18n("Password for remote access:"), piWidget); + lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); temphb = new QHBox( piWidget ); @@ -296,3 +296,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() - lab = new QLabel( i18n("Remote IP address:"), piWidget); + lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); temphb = new QHBox( piWidget ); @@ -302,3 +302,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() - lab = new QLabel( i18n("Remote port number:"), piWidget); + lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); temphb = new QHBox( piWidget ); |