summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp6
-rw-r--r--libkcal/syncdefines.h6
-rw-r--r--libkdepim/ksyncmanager.cpp10
-rw-r--r--libkdepim/ksyncmanager.h1
-rw-r--r--libkdepim/ksyncprefsdialog.cpp333
-rw-r--r--libkdepim/ksyncprefsdialog.h6
-rw-r--r--libkdepim/ksyncprofile.cpp4
-rw-r--r--libkdepim/ksyncprofile.h3
8 files changed, 218 insertions, 151 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 7ddbe23..363dc32 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1161,4 +1161,4 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1161 QDateTime dt; 1161 QDateTime dt;
1162 QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); 1162 QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) );
1163 QDateTime end = cur.addDays( (mSyncManager->mWriteBackInFuture +1 ) *7 ); 1163 QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 );
1164 while ( inR ) { 1164 while ( inR ) {
@@ -1205,3 +1205,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1205 if ( delFut ) { 1205 if ( delFut ) {
1206 delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInFuture, remRem-delFut); 1206 delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are more\nthan %d weeks in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInPast,mSyncManager->mWriteBackInFuture, remRem-delFut);
1207 mes += delmess; 1207 mes += delmess;
diff --git a/libkcal/syncdefines.h b/libkcal/syncdefines.h
index 704a670..f3204a2 100644
--- a/libkcal/syncdefines.h
+++ b/libkcal/syncdefines.h
@@ -4,2 +4,8 @@
4 4
5 enum TargetApp {
6 KOPI = 0,
7 KAPI = 1,
8 PWMPI = 2 };
9
10
5#define SYNC_PREF_LOCAL 0 11#define SYNC_PREF_LOCAL 0
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 6f68d84..33b4a65 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -66,3 +66,3 @@ KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, Targ
66 bar->setCaption (""); 66 bar->setCaption ("");
67 67 mWriteBackInPast = 2;
68 int w = 300; 68 int w = 300;
@@ -250,4 +250,6 @@ void KSyncManager::slotSyncMenu( int action )
250 mWriteBackInFuture = 0; 250 mWriteBackInFuture = 0;
251 if ( temp->getWriteBackFuture() ) 251 if ( temp->getWriteBackFuture() ) {
252 mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); 252 mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
253 mWriteBackInPast = temp->getWriteBackPastWeeks( );
254 }
253 255
@@ -580,4 +582,6 @@ int KSyncManager::ringSync()
580 mWriteBackInFuture = 0; 582 mWriteBackInFuture = 0;
581 if ( temp->getWriteBackFuture() ) 583 if ( temp->getWriteBackFuture() ) {
582 mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); 584 mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
585 mWriteBackInPast = temp->getWriteBackPastWeeks( );
586 }
583 mShowSyncSummary = false; 587 mShowSyncSummary = false;
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 6da0ee4..2d0a4ab 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -143,2 +143,3 @@ class KSyncManager : public QObject
143 int mWriteBackInFuture; 143 int mWriteBackInFuture;
144 int mWriteBackInPast;
144 QString mPhoneDevice; 145 QString mPhoneDevice;
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 03265d2..8a3f4cf 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -45,2 +45,4 @@
45#include <qscrollview.h> 45#include <qscrollview.h>
46#include <qvgroupbox.h>
47#include <qhgroupbox.h>
46 48
@@ -143,3 +145,5 @@ void KSyncPrefsDialog::setupSyncAlgTab()
143 145
144 QHBox *iims = new QHBox( topFrame ); 146
147
148 QHGroupBox *iims = new QHGroupBox( i18n("Multiple Sync options"), topFrame);
145 new QLabel( i18n("Include in multiple "), iims ); 149 new QLabel( i18n("Include in multiple "), iims );
@@ -151,37 +155,55 @@ void KSyncPrefsDialog::setupSyncAlgTab()
151 ++iii; 155 ++iii;
152 156 QVGroupBox* gb0 = new QVGroupBox( i18n("Sync algo options"), topFrame);
153 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); 157 topLayout->addMultiCellWidget(gb0, iii,iii,0,1);
154 topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1);
155 ++iii;
156 QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
157 topLayout->addMultiCellWidget(gr, iii,iii,0,1);
158 ++iii;
159 loc = new QRadioButton ( i18n("Take local entry on conflict"), gr );
160 rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr );
161 newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr );
162 ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr );
163 f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr );
164 f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr );
165 // both = new QRadioButton ( i18n("Take both on conflict"), gr );
166
167 mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame );
168 topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1);
169 ++iii;
170
171 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame );
172 topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1);
173 ++iii; 158 ++iii;
159 QButtonGroup* gr;
160 {
161 QVGroupBox* topFrame = gb0;
162 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame );
163 //topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1);
164 //++iii;
165 gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
166 //topLayout->addMultiCellWidget(gr, iii,iii,0,1);
167 //++iii;
168 loc = new QRadioButton ( i18n("Take local entry on conflict"), gr );
169 rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr );
170 newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr );
171 ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr );
172 f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr );
173 f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr );
174 // both = new QRadioButton ( i18n("Take both on conflict"), gr );
175
176 mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame );
177 //topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1);
178 //++iii;
179
180 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame );
181 // topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1);
182 // ++iii;
174 183
175 mWriteBackExisting= new QCheckBox( i18n("-- Write back (on remote) existing entries only"), topFrame ); 184 QVGroupBox* gb2 = new QVGroupBox( i18n("Write back options"), topFrame);
176 topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); 185 //topLayout->addMultiCellWidget(gb2, iii,iii,0,1);
177 ++iii; 186 //++iii;
178 187 {
179 mWriteBackFuture= new QCheckBox( i18n("-- Write back (calendar) entries in future only"), topFrame ); 188 QVGroupBox*topFrame = gb2;
180 topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); 189 mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame );
181 ++iii; 190 //topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1);
182 topLayout->addMultiCellWidget(new QLabel( i18n("---- Max. weeks in future: ") , topFrame ), iii,iii,0,0); 191 //++iii;
183 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, topFrame); 192 mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame );
184 topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1); 193 //topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1);
185 ++iii; 194 //++iii;
186 195 QHGroupBox* gb3 = new QHGroupBox( i18n("Time period"), topFrame);
196 connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) );
197 new QLabel( i18n("From ") , gb3 );
198 mWriteBackPastWeeks= new QSpinBox(1,104, 1, gb3);
199 new QLabel( i18n(" weeks in the past to ") , gb3 );
200 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, gb3);
201 new QLabel( i18n(" weeks in the future ") , gb3 );
202 //topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1);
203 //++iii;
204 gb3->setEnabled( false );
205 }
206 connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) );
207
208 }
187 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); 209 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
@@ -198,113 +220,124 @@ void KSyncPrefsDialog::setupSyncAlgTab()
198 220
199 221 QVGroupBox* gb1 = new QVGroupBox( i18n("Profile kind specific settings"), topFrame);
200 phoneWidget = new QVBox( topFrame); 222 topLayout->addMultiCellWidget(gb1, iii,iii,0,1);
201 topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
202 ++iii;
203 mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget );
204 QHBox* temphb = new QHBox( phoneWidget );
205 new QLabel( i18n("I/O device: "), temphb );
206 mPhoneDevice = new QLineEdit( temphb);
207 button = new QPushButton( i18n("Help..."), temphb );
208 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) );
209
210
211 temphb = new QHBox( phoneWidget );
212 new QLabel( i18n("Connection: "), temphb );
213 mPhoneConnection = new QLineEdit( temphb);
214 button = new QPushButton( i18n("Help..."), temphb );
215 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) );
216
217
218 temphb = new QHBox( phoneWidget );
219 new QLabel( i18n("Model(opt.): "), temphb );
220 mPhoneModel = new QLineEdit( temphb);
221 button = new QPushButton( i18n("Help..."), temphb );
222 connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) );
223
224 // *** local
225 localFileWidget = new QVBox( topFrame);
226 topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1);
227 ++iii; 223 ++iii;
228 temphb = new QHBox( localFileWidget );
229
230 lab = new QLabel( i18n("Local file Cal:"), temphb );
231 lab = new QLabel( i18n("Local file ABook:"), temphb );
232 lab = new QLabel( i18n("Local file PWMgr:"), temphb );
233 temphb = new QHBox( localFileWidget );
234 button = new QPushButton( i18n("Choose..."), temphb );
235 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) );
236 button = new QPushButton( i18n("Choose..."), temphb );
237 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
238 button = new QPushButton( i18n("Choose..."), temphb );
239 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
240 temphb = new QHBox( localFileWidget );
241
242 mRemoteFile = new QLineEdit( temphb);
243 mRemoteFileAB = new QLineEdit( temphb);
244 mRemoteFilePWM = new QLineEdit( temphb);
245 mIsKapiFileL = new QCheckBox( i18n("Addressbook file (*.vcf) is used by KA/Pi"), localFileWidget );
246
247
248 // *** remote
249 remoteFileWidget = new QVBox( topFrame);
250 topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1);
251 ++iii;
252 temphb = new QHBox( remoteFileWidget );
253 new QLabel( i18n("Calendar:"), temphb);
254 new QLabel( i18n("AddressBook:"), temphb);
255 new QLabel( i18n("PWManager:"), temphb);
256
257 lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget);
258 temphb = new QHBox( remoteFileWidget );
259 mRemotePrecommand = new QLineEdit(temphb);
260 mRemotePrecommandAB = new QLineEdit(temphb);
261 mRemotePrecommandPWM = new QLineEdit(temphb);
262
263 lab = new QLabel( i18n("Local temp file:"), remoteFileWidget);
264 temphb = new QHBox( remoteFileWidget );
265 mLocalTempFile = new QLineEdit(temphb);
266 mLocalTempFileAB = new QLineEdit(temphb);
267 mLocalTempFilePWM = new QLineEdit(temphb);
268
269 lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget);
270 temphb = new QHBox( remoteFileWidget );
271 mRemotePostcommand = new QLineEdit(temphb );
272 mRemotePostcommandAB = new QLineEdit(temphb );
273 mRemotePostcommandPWM = new QLineEdit(temphb );
274 mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget );
275 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget);
276 temphb = new QHBox( remoteFileWidget );
277 button = new QPushButton( i18n("ssh/scp"), temphb );
278 connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) );
279 button = new QPushButton( i18n("ftp"), temphb );
280 connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) );
281 lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget);
282
283 // *** pi-sync
284 piWidget = new QVBox( topFrame);
285 topLayout->addMultiCellWidget(piWidget, iii,iii,0,1);
286 ++iii;
287 temphb = new QHBox( piWidget );
288 new QLabel( i18n("Calendar:"), temphb);
289 new QLabel( i18n("AddressBook:"), temphb);
290 new QLabel( i18n("PWManager:"), temphb);
291
292 lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget);
293 temphb = new QHBox( piWidget );
294 mRemotePw = new QLineEdit(temphb);
295 mRemotePwAB = new QLineEdit(temphb);
296 mRemotePwPWM = new QLineEdit(temphb);
297
298 lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget);
299 temphb = new QHBox( piWidget );
300 mRemoteIP = new QLineEdit(temphb);
301 mRemoteIPAB = new QLineEdit(temphb);
302 mRemoteIPPWM = new QLineEdit(temphb);
303
304 lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget);
305 temphb = new QHBox( piWidget );
306 mRemotePort = new QLineEdit(temphb);
307 mRemotePortAB = new QLineEdit(temphb);
308 mRemotePortPWM = new QLineEdit(temphb);
309 224
225 // ******************************************
226 // Profile kind specific settings
227 {
228 // *** phone *******************************
229 QVGroupBox* topFrame = gb1;
230 phoneWidget = new QVBox( topFrame);
231 //topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
232 //++iii;
233 mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget );
234 QHBox* temphb = new QHBox( phoneWidget );
235 new QLabel( i18n("I/O device: "), temphb );
236 mPhoneDevice = new QLineEdit( temphb);
237 button = new QPushButton( i18n("Help..."), temphb );
238 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) );
239
240
241 temphb = new QHBox( phoneWidget );
242 new QLabel( i18n("Connection: "), temphb );
243 mPhoneConnection = new QLineEdit( temphb);
244 button = new QPushButton( i18n("Help..."), temphb );
245 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) );
246
247
248 temphb = new QHBox( phoneWidget );
249 new QLabel( i18n("Model(opt.): "), temphb );
250 mPhoneModel = new QLineEdit( temphb);
251 button = new QPushButton( i18n("Help..."), temphb );
252 connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) );
253
254 // *** local*******************************
255 localFileWidget = new QVBox( topFrame);
256 //topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1);
257 //++iii;
258 temphb = new QHBox( localFileWidget );
259
260 lab = new QLabel( i18n("Local file Cal:"), temphb );
261 lab = new QLabel( i18n("Local file ABook:"), temphb );
262 lab = new QLabel( i18n("Local file PWMgr:"), temphb );
263 temphb = new QHBox( localFileWidget );
264 button = new QPushButton( i18n("Choose..."), temphb );
265 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) );
266 button = new QPushButton( i18n("Choose..."), temphb );
267 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
268 button = new QPushButton( i18n("Choose..."), temphb );
269 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
270 temphb = new QHBox( localFileWidget );
271
272 mRemoteFile = new QLineEdit( temphb);
273 mRemoteFileAB = new QLineEdit( temphb);
274 mRemoteFilePWM = new QLineEdit( temphb);
275 mIsKapiFileL = new QCheckBox( i18n("Addressbook file (*.vcf) is used by KA/Pi"), localFileWidget );
276
277
278 // *** remote*******************************
279 remoteFileWidget = new QVBox( topFrame);
280 //topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1);
281 //++iii;
282 temphb = new QHBox( remoteFileWidget );
283 new QLabel( i18n("Calendar:"), temphb);
284 new QLabel( i18n("AddressBook:"), temphb);
285 new QLabel( i18n("PWManager:"), temphb);
286
287 lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget);
288 temphb = new QHBox( remoteFileWidget );
289 mRemotePrecommand = new QLineEdit(temphb);
290 mRemotePrecommandAB = new QLineEdit(temphb);
291 mRemotePrecommandPWM = new QLineEdit(temphb);
292
293 lab = new QLabel( i18n("Local temp file:"), remoteFileWidget);
294 temphb = new QHBox( remoteFileWidget );
295 mLocalTempFile = new QLineEdit(temphb);
296 mLocalTempFileAB = new QLineEdit(temphb);
297 mLocalTempFilePWM = new QLineEdit(temphb);
298
299 lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget);
300 temphb = new QHBox( remoteFileWidget );
301 mRemotePostcommand = new QLineEdit(temphb );
302 mRemotePostcommandAB = new QLineEdit(temphb );
303 mRemotePostcommandPWM = new QLineEdit(temphb );
304 mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget );
305 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget);
306 temphb = new QHBox( remoteFileWidget );
307 button = new QPushButton( i18n("ssh/scp"), temphb );
308 connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) );
309 button = new QPushButton( i18n("ftp"), temphb );
310 connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) );
311 lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget);
312
313 // *** pi-sync*******************************
314 piWidget = new QVBox( topFrame);
315 //topLayout->addMultiCellWidget(piWidget, iii,iii,0,1);
316 //++iii;
317 temphb = new QHBox( piWidget );
318 new QLabel( i18n("Calendar:"), temphb);
319 new QLabel( i18n("AddressBook:"), temphb);
320 new QLabel( i18n("PWManager:"), temphb);
321
322 lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget);
323 temphb = new QHBox( piWidget );
324 mRemotePw = new QLineEdit(temphb);
325 mRemotePwAB = new QLineEdit(temphb);
326 mRemotePwPWM = new QLineEdit(temphb);
327
328 lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget);
329 temphb = new QHBox( piWidget );
330 mRemoteIP = new QLineEdit(temphb);
331 mRemoteIPAB = new QLineEdit(temphb);
332 mRemoteIPPWM = new QLineEdit(temphb);
333
334 lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget);
335 temphb = new QHBox( piWidget );
336 mRemotePort = new QLineEdit(temphb);
337 mRemotePortAB = new QLineEdit(temphb);
338 mRemotePortPWM = new QLineEdit(temphb);
339 }
340 // ******************************************
341 // Profile kind specific settings END
342
310} 343}
@@ -313,2 +346,14 @@ void KSyncPrefsDialog::setupSyncAlgTab()
313 346
347void KSyncPrefsDialog::readFilter()
348{
349 mFilterKapi.clear();
350 mFilterKopi.clear();
351 mFilterKopi.append(i18n("No Filter") );
352 mFilterKapi.append(i18n("No Filter") );
353 KConfig cfgko(locateLocal("config","korganizerrc"));
354 KConfig cfgka(locateLocal("config","kaddressbookrc"));
355 cfgko.setGroup("General");
356 mFilterKopi = cfgko.readListEntry("CalendarFilters");
357 mFilterKopi.prepend(i18n("No Filter") );
358}
314 359
@@ -432,2 +477,3 @@ void KSyncPrefsDialog::profileChanged( int item )
432 mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() ); 477 mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() );
478 mWriteBackPastWeeks->setValue( prof->getWriteBackPastWeeks() );
433 479
@@ -595,2 +641,3 @@ void KSyncPrefsDialog::saveProfile()
595 prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); 641 prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value());
642 prof->setWriteBackPastWeeks(mWriteBackPastWeeks->value());
596 if ( mWriteContactToSIM ) 643 if ( mWriteContactToSIM )
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index c601a58..997f524 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -80,5 +80,4 @@ class KSyncPrefsDialog : public KDialog
80 void usrWriteConfig(); 80 void usrWriteConfig();
81
82 void setupSyncAlgTab(); 81 void setupSyncAlgTab();
83 82 void readFilter();
84 private: 83 private:
@@ -87,2 +86,4 @@ class KSyncPrefsDialog : public KDialog
87 QStringList mSyncProfileNames; 86 QStringList mSyncProfileNames;
87 QStringList mFilterKapi;
88 QStringList mFilterKopi;
88 QLineEdit * mMyMachineName; 89 QLineEdit * mMyMachineName;
@@ -144,2 +145,3 @@ class KSyncPrefsDialog : public KDialog
144 QSpinBox* mWriteBackFutureWeeks; 145 QSpinBox* mWriteBackFutureWeeks;
146 QSpinBox* mWriteBackPastWeeks;
145 QCheckBox* mWriteBackExisting; 147 QCheckBox* mWriteBackExisting;
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index 029b70b..9f404cb 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -72,2 +72,3 @@ KSyncProfile* KSyncProfile::clone()
72 myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks ); 72 myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks );
73 myClone->setWriteBackPastWeeks( mWriteBackPastWeeks );
73 myClone->setIncludeInRingSync( mIncludeInRingSync ); 74 myClone->setIncludeInRingSync( mIncludeInRingSync );
@@ -119,2 +120,3 @@ void KSyncProfile::setDefault()
119 mWriteBackFutureWeeks = 12; 120 mWriteBackFutureWeeks = 12;
121 mWriteBackPastWeeks = 2;
120 mWriteBackFile = true; 122 mWriteBackFile = true;
@@ -183,2 +185,3 @@ void KSyncProfile::readConfig(KConfig *config )
183 mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks ); 185 mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks );
186 mWriteBackPastWeeks = config->readNumEntry( "WriteBackPastWeeks", mWriteBackPastWeeks );
184 mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync ); 187 mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync );
@@ -246,2 +249,3 @@ void KSyncProfile::writeConfig( KConfig * config )
246 config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks); 249 config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks);
250 config->writeEntry( "WriteBackPastWeeks", mWriteBackPastWeeks);
247 config->writeEntry( "IsLocalFileSync", mIsLocalFileSync ); 251 config->writeEntry( "IsLocalFileSync", mIsLocalFileSync );
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index 0a59111..e970b50 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -130,2 +130,4 @@ class KSyncProfile : public QObject {
130 int getWriteBackFutureWeeks( ) { return mWriteBackFutureWeeks;} 130 int getWriteBackFutureWeeks( ) { return mWriteBackFutureWeeks;}
131 void setWriteBackPastWeeks( int n ) { mWriteBackPastWeeks= n;}
132 int getWriteBackPastWeeks( ) { return mWriteBackPastWeeks;}
131 void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;} 133 void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;}
@@ -177,2 +179,3 @@ class KSyncProfile : public QObject {
177 int mWriteBackFutureWeeks; 179 int mWriteBackFutureWeeks;
180 int mWriteBackPastWeeks;
178 bool mAskForPreferences; 181 bool mAskForPreferences;