summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncmanager.cpp
Side-by-side diff
Diffstat (limited to 'libkdepim/ksyncmanager.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp27
1 files changed, 22 insertions, 5 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 9a1f2a9..21af295 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -1186,2 +1186,3 @@ void KServerSocket::send_file()
QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog );
+ label->setAlignment ( Qt::AlignHCenter );
QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog );
@@ -1192,4 +1193,6 @@ void KServerSocket::send_file()
int secs = QDateTime::currentDateTime().secsTo( KSyncManager::mRequestedSyncEvent );
- //if ( secs > 30 )
- if ( true )
+ if ( secs < 0 )
+ secs = secs * (-1);
+ if ( secs > 30 )
+ //if ( true )
{
@@ -1197,11 +1200,25 @@ void KServerSocket::send_file()
QLabel* label = new QLabel( warning, mSyncActionDialog );
- if ( secs > 600 )
+ label->setAlignment ( Qt::AlignHCenter );
+ lay->addWidget( label);
+ if ( secs > 180 )
{
+ if ( secs > 300 ) {
+ 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!"))) {
+ qDebug("cancelled ");
+ return ;
+ }
+ }
QFont f = label->font();
+ f.setPointSize ( f.pointSize() *2 );
f. setBold (true );
- f.setPointSize ( f.pointSize() + 10);
+ QLabel* label = new QLabel( warning, mSyncActionDialog );
label->setFont( f );
- }
+ warning = i18n("ADJUST\nYOUR\nCLOCKS!");
+ label->setText( warning );
+ label->setAlignment ( Qt::AlignHCenter );
lay->addWidget( label);
+ mSyncActionDialog->setFixedSize( 230, 300);
+ } else {
mSyncActionDialog->setFixedSize( 230, 200);
+ }
} else {