summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprefsdialog.cpp3
-rw-r--r--libkdepim/ksyncprofile.cpp2
2 files changed, 3 insertions, 2 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}
348void KSyncPrefsDialog::profileChanged( int item ) 349void 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());
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index a43ebe2..2bf4e6c 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -74,25 +74,25 @@ KSyncProfile* KSyncProfile::clone()
74} 74}
75 75
76 76
77void KSyncProfile::setDefault() 77void KSyncProfile::setDefault()
78{ 78{
79 mPreSyncCommand = i18n("command for downloading remote file to local device"); 79 mPreSyncCommand = i18n("command for downloading remote file to local device");
80 mPostSyncCommand = i18n("command for uploading local temp file to remote device"); 80 mPostSyncCommand = i18n("command for uploading local temp file to remote device");
81 mLocalTempFile = "/tmp/mycalendar.ics"; 81 mLocalTempFile = "/tmp/mycalendar.ics";
82 mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics"; 82 mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics";
83 mPreSyncCommandAB = i18n("command for downloading remote file to local device"); 83 mPreSyncCommandAB = i18n("command for downloading remote file to local device");
84 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device"); 84 mPostSyncCommandAB = i18n("command for uploading local temp file to remote device");
85 mLocalTempFileAB = "/tmp/std.vcf"; 85 mLocalTempFileAB = "/tmp/std.vcf";
86 mRemoteFileNamePWM = "/home/polo/kdepim/apps/kabc/localfile.vcf"; 86 mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf";
87 mPreSyncCommandPWM = i18n("command for downloading remote file to local device"); 87 mPreSyncCommandPWM = i18n("command for downloading remote file to local device");
88 mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device"); 88 mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device");
89 mLocalTempFilePWM = "/tmp/passwords.pwm"; 89 mLocalTempFilePWM = "/tmp/passwords.pwm";
90 mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm"; 90 mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm";
91 mShowSummaryAfterSync = true; 91 mShowSummaryAfterSync = true;
92 mAskForPreferences = true; 92 mAskForPreferences = true;
93 mWriteBackExisting = false; 93 mWriteBackExisting = false;
94 mWriteBackFuture = false; 94 mWriteBackFuture = false;
95 mWriteBackFutureWeeks = 12; 95 mWriteBackFutureWeeks = 12;
96 mWriteBackFile = true; 96 mWriteBackFile = true;
97 mIncludeInRingSync = false; 97 mIncludeInRingSync = false;
98 mIncludeInRingSyncAB = false; 98 mIncludeInRingSyncAB = false;