Diffstat (limited to 'libkdepim/ksyncprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 6e6e631..28aac45 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp | |||
@@ -123,24 +123,25 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
123 | ++iii; | 123 | ++iii; |
124 | button = new QPushButton( i18n("New profile"), buttonbox ); | 124 | button = new QPushButton( i18n("New profile"), buttonbox ); |
125 | connect ( button, SIGNAL( clicked()), this, SLOT (newProfile() ) ); | 125 | connect ( button, SIGNAL( clicked()), this, SLOT (newProfile() ) ); |
126 | 126 | ||
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 | mProfileBox->setInsertionPolicy(QComboBox::NoInsertion); | ||
135 | connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) ); | 136 | connect ( mProfileBox, SIGNAL(activated ( int ) ), this, SLOT (profileChanged( int ) ) ); |
136 | connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) ); | 137 | connect ( mProfileBox, SIGNAL( textChanged ( const QString & ) ), this, SLOT (textChanged( const QString & ) ) ); |
137 | 138 | ||
138 | lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame); | 139 | lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame); |
139 | topLayout->addWidget(lab ,iii,0); | 140 | topLayout->addWidget(lab ,iii,0); |
140 | topLayout->addWidget(mProfileBox, iii,1); | 141 | topLayout->addWidget(mProfileBox, iii,1); |
141 | ++iii; | 142 | ++iii; |
142 | 143 | ||
143 | mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame ); | 144 | mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame ); |
144 | topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1); | 145 | topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1); |
145 | ++iii; | 146 | ++iii; |
146 | mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame ); | 147 | mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame ); |
@@ -338,25 +339,25 @@ void KSyncPrefsDialog::textChanged( const QString & s ) | |||
338 | mProfileBox->setCurrentItem(mProfileBox-> currentItem ()); | 339 | mProfileBox->setCurrentItem(mProfileBox-> currentItem ()); |
339 | mProfileBox->blockSignals( false ); | 340 | mProfileBox->blockSignals( false ); |
340 | return; | 341 | return; |
341 | } | 342 | } |
342 | //qDebug("cur i %d ",mProfileBox-> currentItem () ); | 343 | //qDebug("cur i %d ",mProfileBox-> currentItem () ); |
343 | mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ; | 344 | mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ; |
344 | KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ; | 345 | KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ; |
345 | prof->setName( s ); | 346 | prof->setName( s ); |
346 | mSyncProfileNames[mProfileBox-> currentItem ()] = s; | 347 | mSyncProfileNames[mProfileBox-> currentItem ()] = s; |
347 | } | 348 | } |
348 | void KSyncPrefsDialog::profileChanged( int item ) | 349 | void KSyncPrefsDialog::profileChanged( int item ) |
349 | { | 350 | { |
350 | //qDebug("KSyncPrefsDialog::profileChanged %d ", item ); | 351 | //qDebug("KSyncPrefsDialog::profileChanged before %d, count %d ", item, mProfileBox->count() ); |
351 | KSyncProfile* prof; | 352 | KSyncProfile* prof; |
352 | saveProfile(); | 353 | saveProfile(); |
353 | currentSelection = item; | 354 | currentSelection = item; |
354 | prof = mSyncProfiles.at(item) ; | 355 | prof = mSyncProfiles.at(item) ; |
355 | mRemotePrecommand->setText(prof->getPreSyncCommand()); | 356 | mRemotePrecommand->setText(prof->getPreSyncCommand()); |
356 | mRemotePostcommand->setText(prof->getPostSyncCommand()); | 357 | mRemotePostcommand->setText(prof->getPostSyncCommand()); |
357 | mLocalTempFile->setText(prof->getLocalTempFile()); | 358 | mLocalTempFile->setText(prof->getLocalTempFile()); |
358 | mRemoteFile->setText(prof->getRemoteFileName()) ; | 359 | mRemoteFile->setText(prof->getRemoteFileName()) ; |
359 | 360 | ||
360 | mRemotePrecommandAB->setText(prof->getPreSyncCommandAB()); | 361 | mRemotePrecommandAB->setText(prof->getPreSyncCommandAB()); |
361 | mRemotePostcommandAB->setText(prof->getPostSyncCommandAB()); | 362 | mRemotePostcommandAB->setText(prof->getPostSyncCommandAB()); |
362 | mLocalTempFileAB->setText(prof->getLocalTempFileAB()); | 363 | mLocalTempFileAB->setText(prof->getLocalTempFileAB()); |