author | zautrix <zautrix> | 2004-08-01 14:19:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-01 14:19:41 (UTC) |
commit | 3a4186926d078692ad3c2261b70406c391f27554 (patch) (unidiff) | |
tree | 6f71c51606a786711ca2885beb8ee20068e3ccd0 /libkdepim/ksyncprefsdialog.cpp | |
parent | 43d6cf3619675856333d82ae2fcad6ce81d824b8 (diff) | |
download | kdepimpi-3a4186926d078692ad3c2261b70406c391f27554.zip kdepimpi-3a4186926d078692ad3c2261b70406c391f27554.tar.gz kdepimpi-3a4186926d078692ad3c2261b70406c391f27554.tar.bz2 |
Fixed sync config
Diffstat (limited to 'libkdepim/ksyncprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 3df2a3b..7c04f48 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp | |||
@@ -127,35 +127,38 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
127 | button = new QPushButton( i18n("Clone profile"), buttonbox ); | 127 | button = new QPushButton( i18n("Clone profile"), buttonbox ); |
128 | connect ( button, SIGNAL( clicked()), this, SLOT ( cloneProfile() ) ); | 128 | connect ( button, SIGNAL( clicked()), this, SLOT ( cloneProfile() ) ); |
129 | 129 | ||
130 | button = new QPushButton( i18n("Delete profile"), buttonbox ); | 130 | button = new QPushButton( i18n("Delete profile"), buttonbox ); |
131 | connect ( button, SIGNAL( clicked()), this, SLOT (deleteProfile() ) ); | 131 | connect ( button, SIGNAL( clicked()), this, SLOT (deleteProfile() ) ); |
132 | 132 | ||
133 | mProfileBox = new QComboBox(topFrame); | 133 | mProfileBox = new QComboBox(topFrame); |
134 | mProfileBox->setEditable ( true ); | 134 | mProfileBox->setEditable ( true ); |
135 | connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) ); | 135 | connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) ); |
136 | connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) ); | 136 | connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) ); |
137 | 137 | ||
138 | lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame); | 138 | lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame); |
139 | topLayout->addWidget(lab ,iii,0); | 139 | topLayout->addWidget(lab ,iii,0); |
140 | topLayout->addWidget(mProfileBox, iii,1); | 140 | topLayout->addWidget(mProfileBox, iii,1); |
141 | ++iii; | 141 | ++iii; |
142 | 142 | ||
143 | mIncludeInRing = new QCheckBox( i18n("Include in multiple sync"), topFrame ); | 143 | mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame ); |
144 | topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1); | 144 | topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1); |
145 | ++iii; | 145 | ++iii; |
146 | mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame ); | ||
147 | topLayout->addMultiCellWidget(mIncludeInRingAB, iii,iii,0,1); | ||
148 | ++iii; | ||
146 | 149 | ||
147 | mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); | 150 | mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); |
148 | topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); | 151 | topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); |
149 | ++iii; | 152 | ++iii; |
150 | QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); | 153 | QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); |
151 | topLayout->addMultiCellWidget(gr, iii,iii,0,1); | 154 | topLayout->addMultiCellWidget(gr, iii,iii,0,1); |
152 | ++iii; | 155 | ++iii; |
153 | loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); | 156 | loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); |
154 | rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr ); | 157 | rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr ); |
155 | newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr ); | 158 | newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr ); |
156 | ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr ); | 159 | ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr ); |
157 | f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr ); | 160 | f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr ); |
158 | f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr ); | 161 | f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr ); |
159 | // both = new QRadioButton ( i18n("Take both on conflict"), gr ); | 162 | // both = new QRadioButton ( i18n("Take both on conflict"), gr ); |
160 | 163 | ||
161 | mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame ); | 164 | mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame ); |
@@ -262,32 +265,33 @@ void KSyncPrefsDialog::textChanged( const QString & s ) | |||
262 | void KSyncPrefsDialog::profileChanged( int item ) | 265 | void KSyncPrefsDialog::profileChanged( int item ) |
263 | { | 266 | { |
264 | //qDebug("KSyncPrefsDialog::profileChanged %d ", item ); | 267 | //qDebug("KSyncPrefsDialog::profileChanged %d ", item ); |
265 | KSyncProfile* prof; | 268 | KSyncProfile* prof; |
266 | saveProfile(); | 269 | saveProfile(); |
267 | currentSelection = item; | 270 | currentSelection = item; |
268 | prof = mSyncProfiles.at(item) ; | 271 | prof = mSyncProfiles.at(item) ; |
269 | mRemotePrecommand->setText(prof->getPreSyncCommand()); | 272 | mRemotePrecommand->setText(prof->getPreSyncCommand()); |
270 | mRemotePostcommand->setText(prof->getPostSyncCommand()); | 273 | mRemotePostcommand->setText(prof->getPostSyncCommand()); |
271 | mLocalTempFile->setText(prof->getLocalTempFile()); | 274 | mLocalTempFile->setText(prof->getLocalTempFile()); |
272 | mRemoteFile->setText(prof->getRemoteFileName()) ; | 275 | mRemoteFile->setText(prof->getRemoteFileName()) ; |
273 | mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); | 276 | mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); |
274 | mAskForPreferences->setChecked( prof->getAskForPreferences()); | 277 | mAskForPreferences->setChecked( prof->getAskForPreferences()); |
275 | mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); | 278 | mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); |
276 | mWriteBackFile->setChecked( prof->getWriteBackFile()); | 279 | mWriteBackFile->setChecked( prof->getWriteBackFile()); |
277 | mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); | 280 | mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); |
281 | mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); | ||
278 | 282 | ||
279 | switch ( prof->getSyncPrefs() ) { | 283 | switch ( prof->getSyncPrefs() ) { |
280 | case 0: | 284 | case 0: |
281 | loc->setChecked( true); | 285 | loc->setChecked( true); |
282 | break; | 286 | break; |
283 | case 1: | 287 | case 1: |
284 | rem->setChecked( true ); | 288 | rem->setChecked( true ); |
285 | break; | 289 | break; |
286 | case 2: | 290 | case 2: |
287 | newest->setChecked( true); | 291 | newest->setChecked( true); |
288 | break; | 292 | break; |
289 | case 3: | 293 | case 3: |
290 | ask->setChecked( true); | 294 | ask->setChecked( true); |
291 | break; | 295 | break; |
292 | case 4: | 296 | case 4: |
293 | f_loc->setChecked( true); | 297 | f_loc->setChecked( true); |
@@ -348,32 +352,33 @@ void KSyncPrefsDialog::deleteProfile() | |||
348 | } | 352 | } |
349 | 353 | ||
350 | void KSyncPrefsDialog::saveProfile() | 354 | void KSyncPrefsDialog::saveProfile() |
351 | { | 355 | { |
352 | KSyncProfile* prof; | 356 | KSyncProfile* prof; |
353 | if ( currentSelection >= 0 ) { | 357 | if ( currentSelection >= 0 ) { |
354 | prof = mSyncProfiles.at(currentSelection) ; | 358 | prof = mSyncProfiles.at(currentSelection) ; |
355 | prof->setPreSyncCommand( mRemotePrecommand->text()); | 359 | prof->setPreSyncCommand( mRemotePrecommand->text()); |
356 | prof->setPostSyncCommand( mRemotePostcommand->text() ); | 360 | prof->setPostSyncCommand( mRemotePostcommand->text() ); |
357 | prof->setLocalTempFile( mLocalTempFile->text()); | 361 | prof->setLocalTempFile( mLocalTempFile->text()); |
358 | prof->setRemoteFileName( mRemoteFile->text() ); | 362 | prof->setRemoteFileName( mRemoteFile->text() ); |
359 | prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); | 363 | prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); |
360 | prof->setAskForPreferences( mAskForPreferences->isChecked()); | 364 | prof->setAskForPreferences( mAskForPreferences->isChecked()); |
361 | prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); | 365 | prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); |
362 | prof->setWriteBackFile( mWriteBackFile->isChecked()); | 366 | prof->setWriteBackFile( mWriteBackFile->isChecked()); |
363 | prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); | 367 | prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); |
368 | prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); | ||
364 | int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; | 369 | int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; |
365 | prof->setSyncPrefs( syncprefs); | 370 | prof->setSyncPrefs( syncprefs); |
366 | prof->setIsLocalFileSync( mIsLocal->isChecked() ); | 371 | prof->setIsLocalFileSync( mIsLocal->isChecked() ); |
367 | } | 372 | } |
368 | 373 | ||
369 | } | 374 | } |
370 | 375 | ||
371 | void KSyncPrefsDialog::insertProfiles() | 376 | void KSyncPrefsDialog::insertProfiles() |
372 | { | 377 | { |
373 | int curItem = mProfileBox->currentItem(); | 378 | int curItem = mProfileBox->currentItem(); |
374 | mProfileBox->blockSignals( true ); | 379 | mProfileBox->blockSignals( true ); |
375 | mProfileBox->clear(); | 380 | mProfileBox->clear(); |
376 | mProfileBox->insertStringList (mSyncProfileNames ); | 381 | mProfileBox->insertStringList (mSyncProfileNames ); |
377 | int item = mSyncProfileNames.count() -1; | 382 | int item = mSyncProfileNames.count() -1; |
378 | if ( curItem >= 0 && mSyncProfileNames.count() > 0 && curItem < mSyncProfileNames.count() ) | 383 | if ( curItem >= 0 && mSyncProfileNames.count() > 0 && curItem < mSyncProfileNames.count() ) |
379 | mProfileBox->setCurrentItem( curItem ); | 384 | mProfileBox->setCurrentItem( curItem ); |