-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 6e42fd4..2101bbb 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp | |||
@@ -316,124 +316,124 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
316 | mLocalTempFilePWM = new QLineEdit(temphb); | 316 | mLocalTempFilePWM = new QLineEdit(temphb); |
317 | 317 | ||
318 | lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); | 318 | lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); |
319 | temphb = new QHBox( remoteFileWidget ); | 319 | temphb = new QHBox( remoteFileWidget ); |
320 | mRemotePostcommand = new QLineEdit(temphb ); | 320 | mRemotePostcommand = new QLineEdit(temphb ); |
321 | mRemotePostcommandAB = new QLineEdit(temphb ); | 321 | mRemotePostcommandAB = new QLineEdit(temphb ); |
322 | mRemotePostcommandPWM = new QLineEdit(temphb ); | 322 | mRemotePostcommandPWM = new QLineEdit(temphb ); |
323 | mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget ); | 323 | mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget ); |
324 | lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); | 324 | lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); |
325 | temphb = new QHBox( remoteFileWidget ); | 325 | temphb = new QHBox( remoteFileWidget ); |
326 | button = new QPushButton( i18n("ssh/scp"), temphb ); | 326 | button = new QPushButton( i18n("ssh/scp"), temphb ); |
327 | connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); | 327 | connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); |
328 | button = new QPushButton( i18n("ftp"), temphb ); | 328 | button = new QPushButton( i18n("ftp"), temphb ); |
329 | connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) ); | 329 | connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) ); |
330 | lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); | 330 | lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); |
331 | 331 | ||
332 | // *** pi-sync******************************* | 332 | // *** pi-sync******************************* |
333 | piWidget = new QVBox( topFrame); | 333 | piWidget = new QVBox( topFrame); |
334 | //topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); | 334 | //topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); |
335 | //++iii; | 335 | //++iii; |
336 | temphb = new QHBox( piWidget ); | 336 | temphb = new QHBox( piWidget ); |
337 | new QLabel( i18n("Calendar:"), temphb); | 337 | new QLabel( i18n("Calendar:"), temphb); |
338 | new QLabel( i18n("AddressBook:"), temphb); | 338 | new QLabel( i18n("AddressBook:"), temphb); |
339 | new QLabel( i18n("PWManager:"), temphb); | 339 | new QLabel( i18n("PWManager:"), temphb); |
340 | 340 | ||
341 | lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); | 341 | lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); |
342 | temphb = new QHBox( piWidget ); | 342 | temphb = new QHBox( piWidget ); |
343 | mRemotePw = new QLineEdit(temphb); | 343 | mRemotePw = new QLineEdit(temphb); |
344 | mRemotePwAB = new QLineEdit(temphb); | 344 | mRemotePwAB = new QLineEdit(temphb); |
345 | mRemotePwPWM = new QLineEdit(temphb); | 345 | mRemotePwPWM = new QLineEdit(temphb); |
346 | 346 | ||
347 | lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); | 347 | lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); |
348 | temphb = new QHBox( piWidget ); | 348 | temphb = new QHBox( piWidget ); |
349 | mRemoteIP = new QLineEdit(temphb); | 349 | mRemoteIP = new QLineEdit(temphb); |
350 | mRemoteIPAB = new QLineEdit(temphb); | 350 | mRemoteIPAB = new QLineEdit(temphb); |
351 | mRemoteIPPWM = new QLineEdit(temphb); | 351 | mRemoteIPPWM = new QLineEdit(temphb); |
352 | 352 | ||
353 | lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); | 353 | lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); |
354 | temphb = new QHBox( piWidget ); | 354 | temphb = new QHBox( piWidget ); |
355 | mRemotePort = new QLineEdit(temphb); | 355 | mRemotePort = new QLineEdit(temphb); |
356 | mRemotePortAB = new QLineEdit(temphb); | 356 | mRemotePortAB = new QLineEdit(temphb); |
357 | mRemotePortPWM = new QLineEdit(temphb); | 357 | mRemotePortPWM = new QLineEdit(temphb); |
358 | } | 358 | } |
359 | // ****************************************** | 359 | // ****************************************** |
360 | // Profile kind specific settings END | 360 | // Profile kind specific settings END |
361 | 361 | ||
362 | } | 362 | } |
363 | 363 | ||
364 | |||
365 | |||
366 | void KSyncPrefsDialog::readFilter() | 364 | void KSyncPrefsDialog::readFilter() |
367 | { | 365 | { |
368 | mFilterKapi.clear(); | 366 | mFilterKapi.clear(); |
369 | mFilterKopi.clear(); | 367 | mFilterKopi.clear(); |
370 | mFilterKopi.append(i18n("No Filter") ); | ||
371 | mFilterKapi.append(i18n("No Filter") ); | ||
372 | KConfig cfgko(locateLocal("config","korganizerrc")); | 368 | KConfig cfgko(locateLocal("config","korganizerrc")); |
373 | KConfig cfgka(locateLocal("config","kaddressbookrc")); | 369 | KConfig cfgka(locateLocal("config","kaddressbookrc")); |
374 | cfgko.setGroup("General"); | 370 | cfgko.setGroup("General"); |
375 | mFilterKopi = cfgko.readListEntry("CalendarFilters"); | 371 | mFilterKopi = cfgko.readListEntry("CalendarFilters"); |
376 | mFilterKapi = mFilterKopi; | 372 | cfgka.setGroup("Filter"); |
373 | int count = cfgka.readNumEntry( "Count", 0 ); | ||
374 | for ( int i = 0; i < count; i++ ) { | ||
375 | cfgka.setGroup("Filter_"+QString::number( i ) ); | ||
376 | mFilterKapi.append( cfgka.readEntry("Name", "internal error") ); | ||
377 | } | ||
377 | mFilterOutCal->clear(); | 378 | mFilterOutCal->clear(); |
378 | mFilterInCal->clear(); | 379 | mFilterInCal->clear(); |
379 | mFilterOutAB->clear(); | 380 | mFilterOutAB->clear(); |
380 | mFilterInAB->clear(); | 381 | mFilterInAB->clear(); |
381 | QStringList temp = mFilterKopi; | 382 | QStringList temp = mFilterKopi; |
382 | temp.prepend(i18n("No Filter") ); | 383 | temp.prepend(i18n("No Filter") ); |
383 | mFilterOutCal->insertStringList( temp ); | 384 | mFilterOutCal->insertStringList( temp ); |
384 | mFilterInCal->insertStringList( temp ); | 385 | mFilterInCal->insertStringList( temp ); |
385 | temp = mFilterKapi; | 386 | temp = mFilterKapi; |
386 | temp.prepend(i18n("No Filter") ); | 387 | temp.prepend(i18n("No Filter") ); |
387 | mFilterOutAB->insertStringList( temp ); | 388 | mFilterOutAB->insertStringList( temp ); |
388 | mFilterInAB->insertStringList( temp ); | 389 | mFilterInAB->insertStringList( temp ); |
389 | } | 390 | } |
390 | 391 | ||
391 | |||
392 | void KSyncPrefsDialog::slotOK() | 392 | void KSyncPrefsDialog::slotOK() |
393 | { | 393 | { |
394 | if ( mMyMachineName->text() == "undefined" ) { | 394 | if ( mMyMachineName->text() == "undefined" ) { |
395 | KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error")); | 395 | KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error")); |
396 | return; | 396 | return; |
397 | } | 397 | } |
398 | int i; | 398 | int i; |
399 | for (i = 0; i < mSyncProfileNames.count(); ++ i) { | 399 | for (i = 0; i < mSyncProfileNames.count(); ++ i) { |
400 | if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { | 400 | if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { |
401 | KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); | 401 | KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); |
402 | return; | 402 | return; |
403 | } | 403 | } |
404 | } | 404 | } |
405 | usrWriteConfig(); | 405 | usrWriteConfig(); |
406 | QDialog::accept(); | 406 | QDialog::accept(); |
407 | } | 407 | } |
408 | void KSyncPrefsDialog::accept() | 408 | void KSyncPrefsDialog::accept() |
409 | { | 409 | { |
410 | slotOK(); | 410 | slotOK(); |
411 | } | 411 | } |
412 | void KSyncPrefsDialog::chooseFile() | 412 | void KSyncPrefsDialog::chooseFile() |
413 | { | 413 | { |
414 | QString fn = QDir::homeDirPath(); | 414 | QString fn = QDir::homeDirPath(); |
415 | 415 | ||
416 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this ); | 416 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this ); |
417 | if ( fn == "" ) | 417 | if ( fn == "" ) |
418 | return; | 418 | return; |
419 | mRemoteFile->setText( fn ); | 419 | mRemoteFile->setText( fn ); |
420 | } | 420 | } |
421 | 421 | ||
422 | void KSyncPrefsDialog::chooseFileAB() | 422 | void KSyncPrefsDialog::chooseFileAB() |
423 | { | 423 | { |
424 | QString fn = QDir::homeDirPath(); | 424 | QString fn = QDir::homeDirPath(); |
425 | 425 | ||
426 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this ); | 426 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this ); |
427 | if ( fn == "" ) | 427 | if ( fn == "" ) |
428 | return; | 428 | return; |
429 | mRemoteFileAB->setText( fn ); | 429 | mRemoteFileAB->setText( fn ); |
430 | } | 430 | } |
431 | 431 | ||
432 | void KSyncPrefsDialog::chooseFilePWM() | 432 | void KSyncPrefsDialog::chooseFilePWM() |
433 | { | 433 | { |
434 | QString fn = QDir::homeDirPath(); | 434 | QString fn = QDir::homeDirPath(); |
435 | 435 | ||
436 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this ); | 436 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this ); |
437 | if ( fn == "" ) | 437 | if ( fn == "" ) |
438 | return; | 438 | return; |
439 | mRemoteFilePWM->setText( fn ); | 439 | mRemoteFilePWM->setText( fn ); |