-rw-r--r-- | libkdepim/ksyncmanager.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 9177f63..c8d0e0d 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -71,18 +71,22 @@ KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, Targ | |||
71 | int h = bar->sizeHint().height() ; | 71 | int h = bar->sizeHint().height() ; |
72 | int dw = QApplication::desktop()->width(); | 72 | int dw = QApplication::desktop()->width(); |
73 | int dh = QApplication::desktop()->height(); | 73 | int dh = QApplication::desktop()->height(); |
74 | bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 74 | bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
75 | if ( mPrefs->mPassiveSyncAutoStart ) | ||
76 | enableQuick( false ); | ||
77 | 75 | ||
78 | } | 76 | } |
79 | 77 | ||
80 | KSyncManager::~KSyncManager() | 78 | KSyncManager::~KSyncManager() |
81 | { | 79 | { |
82 | delete bar; | 80 | delete bar; |
83 | } | 81 | } |
84 | 82 | ||
83 | void KSyncManager::setDefaultFileName( QString s) | ||
84 | { | ||
85 | mDefFileName = s ; | ||
86 | if ( mPrefs->mPassiveSyncAutoStart ) | ||
87 | enableQuick( false ); | ||
88 | } | ||
85 | 89 | ||
86 | void KSyncManager::fillSyncMenu() | 90 | void KSyncManager::fillSyncMenu() |
87 | { | 91 | { |
88 | if ( mSyncMenu->count() ) | 92 | if ( mSyncMenu->count() ) |
@@ -411,9 +415,8 @@ void KSyncManager::enableQuick( bool ask ) | |||
411 | } | 415 | } |
412 | //qDebug("port %d ", port); | 416 | //qDebug("port %d ", port); |
413 | mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 ); | 417 | mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 ); |
414 | mServerSocket->setFileName( defaultFileName() );//bbb | 418 | mServerSocket->setFileName( defaultFileName() );//bbb |
415 | //qDebug("connected "); | ||
416 | if ( !mServerSocket->ok() ) { | 419 | if ( !mServerSocket->ok() ) { |
417 | KMessageBox::information( 0, i18n("Failed to bind or\nlisten to the port!")); | 420 | KMessageBox::information( 0, i18n("Failed to bind or\nlisten to the port!")); |
418 | delete mServerSocket; | 421 | delete mServerSocket; |
419 | mServerSocket = 0; | 422 | mServerSocket = 0; |
@@ -1116,9 +1119,9 @@ KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject | |||
1116 | mPassWord = pw; | 1119 | mPassWord = pw; |
1117 | mSocket = 0; | 1120 | mSocket = 0; |
1118 | mSyncActionDialog = 0; | 1121 | mSyncActionDialog = 0; |
1119 | blockRC = false; | 1122 | blockRC = false; |
1120 | }; | 1123 | } |
1121 | 1124 | ||
1122 | void KServerSocket::newConnection ( int socket ) | 1125 | void KServerSocket::newConnection ( int socket ) |
1123 | { | 1126 | { |
1124 | // qDebug("KServerSocket:New connection %d ", socket); | 1127 | // qDebug("KServerSocket:New connection %d ", socket); |