summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncmanager.cpp
Unidiff
Diffstat (limited to 'libkdepim/ksyncmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 6baa2ee..5175f94 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -151,64 +151,65 @@ void KSyncManager::slotSyncMenu( int action )
151 if ( action == 1 ) { 151 if ( action == 1 ) {
152 multiSync( true ); 152 multiSync( true );
153 return; 153 return;
154 } 154 }
155 if ( action == 2 ) { 155 if ( action == 2 ) {
156 enableQuick(); 156 enableQuick();
157 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); 157 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
158 return; 158 return;
159 } 159 }
160 if ( action == 3 ) { 160 if ( action == 3 ) {
161 delete mServerSocket; 161 delete mServerSocket;
162 mServerSocket = 0; 162 mServerSocket = 0;
163 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); 163 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
164 return; 164 return;
165 } 165 }
166 166
167 if (blockSave()) 167 if (blockSave())
168 return; 168 return;
169 169
170 setBlockSave(true); 170 setBlockSave(true);
171 171
172 mCurrentSyncProfile = action - 1000 ; 172 mCurrentSyncProfile = action - 1000 ;
173 mCurrentSyncDevice = mSyncProfileNames[mCurrentSyncProfile] ; 173 mCurrentSyncDevice = mSyncProfileNames[mCurrentSyncProfile] ;
174 mCurrentSyncName = mLocalMachineName ; 174 mCurrentSyncName = mLocalMachineName ;
175 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); 175 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
176 KSyncProfile* temp = new KSyncProfile (); 176 KSyncProfile* temp = new KSyncProfile ();
177 temp->setName(mSyncProfileNames[mCurrentSyncProfile]); 177 temp->setName(mSyncProfileNames[mCurrentSyncProfile]);
178 temp->readConfig(&config); 178 temp->readConfig(&config);
179 mAskForPreferences = temp->getAskForPreferences(); 179 mAskForPreferences = temp->getAskForPreferences();
180 mSyncAlgoPrefs = temp->getSyncPrefs(); 180 mSyncAlgoPrefs = temp->getSyncPrefs();
181 mWriteBackFile = temp->getWriteBackFile(); 181 mWriteBackFile = temp->getWriteBackFile();
182 mWriteBackExistingOnly = temp->getWriteBackExisting(); 182 mWriteBackExistingOnly = temp->getWriteBackExisting();
183 mIsKapiFile = temp->getIsKapiFile();
183 mWriteBackInFuture = 0; 184 mWriteBackInFuture = 0;
184 if ( temp->getWriteBackFuture() ) 185 if ( temp->getWriteBackFuture() )
185 mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); 186 mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
186 mShowSyncSummary = temp->getShowSummaryAfterSync(); 187 mShowSyncSummary = temp->getShowSummaryAfterSync();
187 if ( action == 1000 ) { 188 if ( action == 1000 ) {
188 syncSharp(); 189 syncSharp();
189 190
190 } else if ( action == 1001 ) { 191 } else if ( action == 1001 ) {
191 syncLocalFile(); 192 syncLocalFile();
192 193
193 } else if ( action == 1002 ) { 194 } else if ( action == 1002 ) {
194 mWriteBackFile = false; 195 mWriteBackFile = false;
195 mAskForPreferences = false; 196 mAskForPreferences = false;
196 mShowSyncSummary = false; 197 mShowSyncSummary = false;
197 mSyncAlgoPrefs = 3; 198 mSyncAlgoPrefs = 3;
198 quickSyncLocalFile(); 199 quickSyncLocalFile();
199 200
200 } else if ( action >= 1003 ) { 201 } else if ( action >= 1003 ) {
201 if ( temp->getIsLocalFileSync() ) { 202 if ( temp->getIsLocalFileSync() ) {
202 switch(mTargetApp) 203 switch(mTargetApp)
203 { 204 {
204 case (KAPI): 205 case (KAPI):
205 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) ) 206 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) )
206 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB(); 207 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB();
207 break; 208 break;
208 case (KOPI): 209 case (KOPI):
209 if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 210 if ( syncWithFile( temp->getRemoteFileName( ), false ) )
210 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName(); 211 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName();
211 break; 212 break;
212 case (PWMPI): 213 case (PWMPI):
213 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) ) 214 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) )
214 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM(); 215 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM();