author | zautrix <zautrix> | 2004-10-28 17:07:24 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-28 17:07:24 (UTC) |
commit | 709e2793be2dd47dc0a15488f43fd2f058db2036 (patch) (side-by-side diff) | |
tree | f2f90d42bd0125d73bb57f5e3d1c3e1bd9d05196 /libkdepim | |
parent | 4254a88dbb00ebf5f5b323e1ddddf3491e3fdb24 (diff) | |
download | kdepimpi-709e2793be2dd47dc0a15488f43fd2f058db2036.zip kdepimpi-709e2793be2dd47dc0a15488f43fd2f058db2036.tar.gz kdepimpi-709e2793be2dd47dc0a15488f43fd2f058db2036.tar.bz2 |
showing clcok skew in pisync
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 9857e3e..9a1f2a9 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -353,2 +353,3 @@ void KSyncManager::enableQuick( bool ask ) QCheckBox syncdesktop( i18n("Automatically sync with Outlook\nwhen receiving sync request"),&dia ); + syncdesktop.hide();// not implemented! #else @@ -575,2 +576,3 @@ int KSyncManager::ringSync() mWriteBackExistingOnly = temp->getWriteBackExisting(); + mIsKapiFile = temp->getIsKapiFile(); mWriteBackInFuture = 0; @@ -582,2 +584,3 @@ int KSyncManager::ringSync() if ( i == 0 ) { + mIsKapiFile = false; #ifdef DESKTOP_VERSION @@ -1023,2 +1026,3 @@ void KSyncManager::syncPi() { + mIsKapiFile = true; mPisyncFinished = false; @@ -1140,4 +1144,5 @@ void KServerSocket::readClient() QDateTime dt = KGlobal::locale()->readDateTime( tokens[2], KLocale::ISODate, &ok); - if ( ok ) + if ( ok ) { KSyncManager::mRequestedSyncEvent = dt; + } else @@ -1185,3 +1190,23 @@ void KServerSocket::send_file() lay->setSpacing(7); - mSyncActionDialog->setFixedSize( 230, 120); + if ( KSyncManager::mRequestedSyncEvent.isValid() ) { + int secs = QDateTime::currentDateTime().secsTo( KSyncManager::mRequestedSyncEvent ); + //if ( secs > 30 ) + if ( true ) + { + QString warning = i18n("Clock skew of\nsyncing devices\nis %1 seconds!").arg( secs ); + QLabel* label = new QLabel( warning, mSyncActionDialog ); + if ( secs > 600 ) + { + QFont f = label->font(); + f. setBold (true ); + f.setPointSize ( f.pointSize() + 10); + label->setFont( f ); + } + lay->addWidget( label); + mSyncActionDialog->setFixedSize( 230, 200); + } else { + mSyncActionDialog->setFixedSize( 230, 120); + } + } else + mSyncActionDialog->setFixedSize( 230, 120); mSyncActionDialog->show(); @@ -1300,3 +1325,3 @@ void KCommandSocket::readFile( QString fn ) - QString curDt = KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate ); + QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate ); os << "GET " << mPassWord << curDt <<"\r\n"; |