summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp37
1 files changed, 27 insertions, 10 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 9a1f2a9..21af295 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -1184,5 +1184,6 @@ void KServerSocket::send_file()
1184 mSyncActionDialog = new QDialog ( 0, "input-dialog", true ); 1184 mSyncActionDialog = new QDialog ( 0, "input-dialog", true );
1185 mSyncActionDialog->setCaption(i18n("Received sync request")); 1185 mSyncActionDialog->setCaption(i18n("Received sync request"));
1186 QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog ); 1186 QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog );
1187 label->setAlignment ( Qt::AlignHCenter );
1187 QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog ); 1188 QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog );
1188 lay->addWidget( label); 1189 lay->addWidget( label);
@@ -1191,18 +1192,34 @@ void KServerSocket::send_file()
1191 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 1192 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
1192 int secs = QDateTime::currentDateTime().secsTo( KSyncManager::mRequestedSyncEvent ); 1193 int secs = QDateTime::currentDateTime().secsTo( KSyncManager::mRequestedSyncEvent );
1193 //if ( secs > 30 ) 1194 if ( secs < 0 )
1194 if ( true ) 1195 secs = secs * (-1);
1196 if ( secs > 30 )
1197 //if ( true )
1195 { 1198 {
1196 QString warning = i18n("Clock skew of\nsyncing devices\nis %1 seconds!").arg( secs ); 1199 QString warning = i18n("Clock skew of\nsyncing devices\nis %1 seconds!").arg( secs );
1197 QLabel* label = new QLabel( warning, mSyncActionDialog ); 1200 QLabel* label = new QLabel( warning, mSyncActionDialog );
1198 if ( secs > 600 ) 1201 label->setAlignment ( Qt::AlignHCenter );
1202 lay->addWidget( label);
1203 if ( secs > 180 )
1199 { 1204 {
1205 if ( secs > 300 ) {
1206 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.\n<b>You may get wrong syncing results!<\b>\nPlease confirm synchronization!"), i18n("High clock skew!"),i18n("Synchronize!"))) {
1207 qDebug("cancelled ");
1208 return ;
1209 }
1210 }
1200 QFont f = label->font(); 1211 QFont f = label->font();
1212 f.setPointSize ( f.pointSize() *2 );
1201 f. setBold (true ); 1213 f. setBold (true );
1202 f.setPointSize ( f.pointSize() + 10); 1214 QLabel* label = new QLabel( warning, mSyncActionDialog );
1203 label->setFont( f ); 1215 label->setFont( f );
1204 } 1216 warning = i18n("ADJUST\nYOUR\nCLOCKS!");
1205 lay->addWidget( label); 1217 label->setText( warning );
1206 mSyncActionDialog->setFixedSize( 230, 200); 1218 label->setAlignment ( Qt::AlignHCenter );
1219 lay->addWidget( label);
1220 mSyncActionDialog->setFixedSize( 230, 300);
1221 } else {
1222 mSyncActionDialog->setFixedSize( 230, 200);
1223 }
1207 } else { 1224 } else {
1208 mSyncActionDialog->setFixedSize( 230, 120); 1225 mSyncActionDialog->setFixedSize( 230, 120);