summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp8
-rw-r--r--libkdepim/ksyncprefsdialog.cpp7
-rw-r--r--libkdepim/ksyncprefsdialog.h1
-rw-r--r--libkdepim/ksyncprofile.cpp4
-rw-r--r--libkdepim/ksyncprofile.h3
5 files changed, 18 insertions, 5 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index d0d1f3b..298fa82 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -858,14 +858,14 @@ int MainWindow::ringSync()
int syncedProfiles = 0;
int i;
QTime timer;
- KConfig *config = KOGlobals::config();
+ KConfig config ( locateLocal( "config","syncprofilesrc" ) );
QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames;
KSyncProfile* temp = new KSyncProfile ();
KOPrefs::instance()->mAskForPreferences = false;
for ( i = 0; i < syncProfileNames.count(); ++i ) {
mCurrentSyncProfile = i;
temp->setName(syncProfileNames[mCurrentSyncProfile]);
- temp->readConfig(config);
+ temp->readConfig(&config);
if ( temp->getIncludeInRingSync() && ( i < 1 || i > 2 )) {
setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... "));
++syncedProfiles;
@@ -956,10 +956,10 @@ void MainWindow::slotSyncMenu( int action )
mCurrentSyncProfile = action - 1000 ;
mView->setSyncDevice(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile] );
mView->setSyncName( KOPrefs::instance()->mLocalMachineName );
- KConfig *config = KOGlobals::config();
+ KConfig config ( locateLocal( "config","syncprofilesrc" ) );
KSyncProfile* temp = new KSyncProfile ();
temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]);
- temp->readConfig(config);
+ temp->readConfig(&config);
KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences();
KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs();
KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile();
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 3df2a3b..7c04f48 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -140,9 +140,12 @@ void KSyncPrefsDialog::setupSyncAlgTab()
topLayout->addWidget(mProfileBox, iii,1);
++iii;
- mIncludeInRing = new QCheckBox( i18n("Include in multiple sync"), topFrame );
+ mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame );
topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1);
++iii;
+ mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame );
+ topLayout->addMultiCellWidget(mIncludeInRingAB, iii,iii,0,1);
+ ++iii;
mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame );
topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1);
@@ -275,6 +278,7 @@ void KSyncPrefsDialog::profileChanged( int item )
mWriteBackExisting->setChecked( prof->getWriteBackExisting() );
mWriteBackFile->setChecked( prof->getWriteBackFile());
mIncludeInRing->setChecked( prof->getIncludeInRingSync() );
+ mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() );
switch ( prof->getSyncPrefs() ) {
case 0:
@@ -361,6 +365,7 @@ void KSyncPrefsDialog::saveProfile()
prof->setWriteBackExisting(mWriteBackExisting->isChecked() );
prof->setWriteBackFile( mWriteBackFile->isChecked());
prof->setIncludeInRingSync( mIncludeInRing->isChecked() );
+ prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() );
int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ;
prof->setSyncPrefs( syncprefs);
prof->setIsLocalFileSync( mIsLocal->isChecked() );
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index 90fa286..c663d22 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -85,6 +85,7 @@ class KSyncPrefsDialog : public KDialog
QRadioButton* mIsLocal;
QRadioButton* mIsNotLocal;
QCheckBox* mIncludeInRing;
+ QCheckBox* mIncludeInRingAB;
void addProfile ( KSyncProfile* );
void insertProfiles();
void saveProfile();
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index d6d8fa3..ea41a85 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -52,6 +52,7 @@ KSyncProfile* KSyncProfile::clone()
myClone->setWriteBackExisting(mWriteBackExisting );
myClone->setWriteBackFile( mWriteBackFile);
myClone->setIncludeInRingSync( mIncludeInRingSync );
+ myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
myClone->setSyncPrefs( mSyncPrefs);
myClone->setIsLocalFileSync( mIsLocalFileSync );
myClone->setName( "noName" );
@@ -71,6 +72,7 @@ void KSyncProfile::setDefault()
mWriteBackExisting = false;
mWriteBackFile = true;
mIncludeInRingSync = false;
+ mIncludeInRingSyncAB = false;
mSyncPrefs = SYNC_PREF_ASK;
mIsLocalFileSync = true;
@@ -83,6 +85,7 @@ void KSyncProfile::readConfig(KConfig *config )
mPreSyncCommand = config->readEntry( prefix+ "PreSyncCommand",mPreSyncCommand );
mPostSyncCommand = config->readEntry( prefix+ "PostSyncCommand", mPostSyncCommand );
mIncludeInRingSync = config->readBoolEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
+ mIncludeInRingSyncAB = config->readBoolEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
mLocalTempFile = config->readEntry( prefix+ "LocalTempFile", mLocalTempFile );
mRemoteFileName = config->readEntry( prefix+ "RemoteFileName", mRemoteFileName );
mShowSummaryAfterSync = config->readBoolEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync );
@@ -99,6 +102,7 @@ void KSyncProfile::writeConfig( KConfig * config )
config->writeEntry( prefix+ "PreSyncCommand",mPreSyncCommand );
config->writeEntry( prefix+ "PostSyncCommand", mPostSyncCommand );
config->writeEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
+ config->writeEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
config->writeEntry( prefix+ "LocalTempFile", mLocalTempFile );
config->writeEntry( prefix+ "RemoteFileName", mRemoteFileName );
config->writeEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync );
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index 3f7f1ac..df1b49e 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -79,6 +79,8 @@ class KSyncProfile : public QObject {
bool getWriteBackFile( ) { return mWriteBackFile;}
void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;}
bool getIncludeInRingSync( ) { return mIncludeInRingSync;}
+ void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;}
+ bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;}
void setSyncPrefs( int n ) { mSyncPrefs= n;}
int getSyncPrefs( ) { return mSyncPrefs;}
void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;}
@@ -91,6 +93,7 @@ class KSyncProfile : public QObject {
QString mLocalTempFile;
QString mRemoteFileName;
bool mIncludeInRingSync;
+ bool mIncludeInRingSyncAB;
int mSyncPrefs;
bool mWriteBackFile;
bool mWriteBackExisting;