summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2004-10-28 17:07:24 (UTC)
committer zautrix <zautrix>2004-10-28 17:07:24 (UTC)
commit709e2793be2dd47dc0a15488f43fd2f058db2036 (patch) (unidiff)
treef2f90d42bd0125d73bb57f5e3d1c3e1bd9d05196 /libkdepim
parent4254a88dbb00ebf5f5b323e1ddddf3491e3fdb24 (diff)
downloadkdepimpi-709e2793be2dd47dc0a15488f43fd2f058db2036.zip
kdepimpi-709e2793be2dd47dc0a15488f43fd2f058db2036.tar.gz
kdepimpi-709e2793be2dd47dc0a15488f43fd2f058db2036.tar.bz2
showing clcok skew in pisync
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp31
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
@@ -351,6 +351,7 @@ void KSyncManager::enableQuick( bool ask )
351#ifdef DESKTOP_VERSION 351#ifdef DESKTOP_VERSION
352#ifdef _WIN32_ 352#ifdef _WIN32_
353 QCheckBox syncdesktop( i18n("Automatically sync with Outlook\nwhen receiving sync request"),&dia ); 353 QCheckBox syncdesktop( i18n("Automatically sync with Outlook\nwhen receiving sync request"),&dia );
354 syncdesktop.hide();// not implemented!
354#else 355#else
355 QCheckBox syncdesktop( i18n("Automatically sync with KDE-Desktop\nwhen receiving sync request"),&dia ); 356 QCheckBox syncdesktop( i18n("Automatically sync with KDE-Desktop\nwhen receiving sync request"),&dia );
356#endif 357#endif
@@ -573,6 +574,7 @@ int KSyncManager::ringSync()
573 // mAskForPreferences = temp->getAskForPreferences(); 574 // mAskForPreferences = temp->getAskForPreferences();
574 mWriteBackFile = temp->getWriteBackFile(); 575 mWriteBackFile = temp->getWriteBackFile();
575 mWriteBackExistingOnly = temp->getWriteBackExisting(); 576 mWriteBackExistingOnly = temp->getWriteBackExisting();
577 mIsKapiFile = temp->getIsKapiFile();
576 mWriteBackInFuture = 0; 578 mWriteBackInFuture = 0;
577 if ( temp->getWriteBackFuture() ) 579 if ( temp->getWriteBackFuture() )
578 mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); 580 mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
@@ -580,6 +582,7 @@ int KSyncManager::ringSync()
580 mCurrentSyncDevice = syncProfileNames[i] ; 582 mCurrentSyncDevice = syncProfileNames[i] ;
581 mCurrentSyncName = mLocalMachineName; 583 mCurrentSyncName = mLocalMachineName;
582 if ( i == 0 ) { 584 if ( i == 0 ) {
585 mIsKapiFile = false;
583#ifdef DESKTOP_VERSION 586#ifdef DESKTOP_VERSION
584 syncKDE(); 587 syncKDE();
585#else 588#else
@@ -1021,6 +1024,7 @@ QString KSyncManager::syncFileName()
1021 1024
1022void KSyncManager::syncPi() 1025void KSyncManager::syncPi()
1023{ 1026{
1027 mIsKapiFile = true;
1024 mPisyncFinished = false; 1028 mPisyncFinished = false;
1025 qApp->processEvents(); 1029 qApp->processEvents();
1026 if ( mAskForPreferences ) 1030 if ( mAskForPreferences )
@@ -1138,8 +1142,9 @@ void KServerSocket::readClient()
1138 //emit sendFile( mSocket ); 1142 //emit sendFile( mSocket );
1139 bool ok = false; 1143 bool ok = false;
1140 QDateTime dt = KGlobal::locale()->readDateTime( tokens[2], KLocale::ISODate, &ok); 1144 QDateTime dt = KGlobal::locale()->readDateTime( tokens[2], KLocale::ISODate, &ok);
1141 if ( ok ) 1145 if ( ok ) {
1142 KSyncManager::mRequestedSyncEvent = dt; 1146 KSyncManager::mRequestedSyncEvent = dt;
1147 }
1143 else 1148 else
1144 KSyncManager::mRequestedSyncEvent = QDateTime(); 1149 KSyncManager::mRequestedSyncEvent = QDateTime();
1145 send_file(); 1150 send_file();
@@ -1183,7 +1188,27 @@ void KServerSocket::send_file()
1183 lay->addWidget( label); 1188 lay->addWidget( label);
1184 lay->setMargin(7); 1189 lay->setMargin(7);
1185 lay->setSpacing(7); 1190 lay->setSpacing(7);
1186 mSyncActionDialog->setFixedSize( 230, 120); 1191 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
1192 int secs = QDateTime::currentDateTime().secsTo( KSyncManager::mRequestedSyncEvent );
1193 //if ( secs > 30 )
1194 if ( true )
1195 {
1196 QString warning = i18n("Clock skew of\nsyncing devices\nis %1 seconds!").arg( secs );
1197 QLabel* label = new QLabel( warning, mSyncActionDialog );
1198 if ( secs > 600 )
1199 {
1200 QFont f = label->font();
1201 f. setBold (true );
1202 f.setPointSize ( f.pointSize() + 10);
1203 label->setFont( f );
1204 }
1205 lay->addWidget( label);
1206 mSyncActionDialog->setFixedSize( 230, 200);
1207 } else {
1208 mSyncActionDialog->setFixedSize( 230, 120);
1209 }
1210 } else
1211 mSyncActionDialog->setFixedSize( 230, 120);
1187 mSyncActionDialog->show(); 1212 mSyncActionDialog->show();
1188 mSyncActionDialog->raise(); 1213 mSyncActionDialog->raise();
1189 emit request_file(); 1214 emit request_file();
@@ -1298,7 +1323,7 @@ void KCommandSocket::readFile( QString fn )
1298 QTextStream os( mSocket ); 1323 QTextStream os( mSocket );
1299 os.setEncoding( QTextStream::Latin1 ); 1324 os.setEncoding( QTextStream::Latin1 );
1300 1325
1301 QString curDt = KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate ); 1326 QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate );
1302 os << "GET " << mPassWord << curDt <<"\r\n"; 1327 os << "GET " << mPassWord << curDt <<"\r\n";
1303 mTimerSocket->start( 20000 ); 1328 mTimerSocket->start( 20000 );
1304} 1329}