-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 @@ -340,76 +340,76 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); temphb = new QHBox( piWidget ); mRemotePw = new QLineEdit(temphb); mRemotePwAB = new QLineEdit(temphb); mRemotePwPWM = new QLineEdit(temphb); lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); temphb = new QHBox( piWidget ); mRemoteIP = new QLineEdit(temphb); mRemoteIPAB = new QLineEdit(temphb); mRemoteIPPWM = new QLineEdit(temphb); lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); temphb = new QHBox( piWidget ); mRemotePort = new QLineEdit(temphb); mRemotePortAB = new QLineEdit(temphb); mRemotePortPWM = new QLineEdit(temphb); } // ****************************************** // Profile kind specific settings END } - - void KSyncPrefsDialog::readFilter() { mFilterKapi.clear(); mFilterKopi.clear(); - mFilterKopi.append(i18n("No Filter") ); - mFilterKapi.append(i18n("No Filter") ); KConfig cfgko(locateLocal("config","korganizerrc")); KConfig cfgka(locateLocal("config","kaddressbookrc")); cfgko.setGroup("General"); mFilterKopi = cfgko.readListEntry("CalendarFilters"); - mFilterKapi = mFilterKopi; + cfgka.setGroup("Filter"); + int count = cfgka.readNumEntry( "Count", 0 ); + for ( int i = 0; i < count; i++ ) { + cfgka.setGroup("Filter_"+QString::number( i ) ); + mFilterKapi.append( cfgka.readEntry("Name", "internal error") ); + } mFilterOutCal->clear(); mFilterInCal->clear(); mFilterOutAB->clear(); mFilterInAB->clear(); QStringList temp = mFilterKopi; temp.prepend(i18n("No Filter") ); mFilterOutCal->insertStringList( temp ); mFilterInCal->insertStringList( temp ); temp = mFilterKapi; temp.prepend(i18n("No Filter") ); mFilterOutAB->insertStringList( temp ); mFilterInAB->insertStringList( temp ); } - void KSyncPrefsDialog::slotOK() { if ( mMyMachineName->text() == "undefined" ) { KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error")); return; } int i; for (i = 0; i < mSyncProfileNames.count(); ++ i) { if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); return; } } usrWriteConfig(); QDialog::accept(); } void KSyncPrefsDialog::accept() { slotOK(); } void KSyncPrefsDialog::chooseFile() { QString fn = QDir::homeDirPath(); |