summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncmanager.cpp
Side-by-side diff
Diffstat (limited to 'libkdepim/ksyncmanager.cpp') (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
@@ -352,4 +352,5 @@ void KSyncManager::enableQuick( bool ask )
#ifdef _WIN32_
QCheckBox syncdesktop( i18n("Automatically sync with Outlook\nwhen receiving sync request"),&dia );
+ syncdesktop.hide();// not implemented!
#else
QCheckBox syncdesktop( i18n("Automatically sync with KDE-Desktop\nwhen receiving sync request"),&dia );
@@ -574,4 +575,5 @@ int KSyncManager::ringSync()
mWriteBackFile = temp->getWriteBackFile();
mWriteBackExistingOnly = temp->getWriteBackExisting();
+ mIsKapiFile = temp->getIsKapiFile();
mWriteBackInFuture = 0;
if ( temp->getWriteBackFuture() )
@@ -581,4 +583,5 @@ int KSyncManager::ringSync()
mCurrentSyncName = mLocalMachineName;
if ( i == 0 ) {
+ mIsKapiFile = false;
#ifdef DESKTOP_VERSION
syncKDE();
@@ -1022,4 +1025,5 @@ QString KSyncManager::syncFileName()
void KSyncManager::syncPi()
{
+ mIsKapiFile = true;
mPisyncFinished = false;
qApp->processEvents();
@@ -1139,6 +1143,7 @@ void KServerSocket::readClient()
bool ok = false;
QDateTime dt = KGlobal::locale()->readDateTime( tokens[2], KLocale::ISODate, &ok);
- if ( ok )
+ if ( ok ) {
KSyncManager::mRequestedSyncEvent = dt;
+ }
else
KSyncManager::mRequestedSyncEvent = QDateTime();
@@ -1184,5 +1189,25 @@ void KServerSocket::send_file()
lay->setMargin(7);
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();
mSyncActionDialog->raise();
@@ -1299,5 +1324,5 @@ void KCommandSocket::readFile( QString fn )
os.setEncoding( QTextStream::Latin1 );
- 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";
mTimerSocket->start( 20000 );