summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-08-01 14:19:41 (UTC)
committer zautrix <zautrix>2004-08-01 14:19:41 (UTC)
commit3a4186926d078692ad3c2261b70406c391f27554 (patch) (side-by-side diff)
tree6f71c51606a786711ca2885beb8ee20068e3ccd0
parent43d6cf3619675856333d82ae2fcad6ce81d824b8 (diff)
downloadkdepimpi-3a4186926d078692ad3c2261b70406c391f27554.zip
kdepimpi-3a4186926d078692ad3c2261b70406c391f27554.tar.gz
kdepimpi-3a4186926d078692ad3c2261b70406c391f27554.tar.bz2
Fixed sync config
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
@@ -860,3 +860,3 @@ int MainWindow::ringSync()
QTime timer;
- KConfig *config = KOGlobals::config();
+ KConfig config ( locateLocal( "config","syncprofilesrc" ) );
QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames;
@@ -867,3 +867,3 @@ int MainWindow::ringSync()
temp->setName(syncProfileNames[mCurrentSyncProfile]);
- temp->readConfig(config);
+ temp->readConfig(&config);
if ( temp->getIncludeInRingSync() && ( i < 1 || i > 2 )) {
@@ -958,6 +958,6 @@ void MainWindow::slotSyncMenu( int action )
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();
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 3df2a3b..7c04f48 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -142,5 +142,8 @@ void KSyncPrefsDialog::setupSyncAlgTab()
- 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;
@@ -277,2 +280,3 @@ void KSyncPrefsDialog::profileChanged( int item )
mIncludeInRing->setChecked( prof->getIncludeInRingSync() );
+ mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() );
@@ -363,2 +367,3 @@ void KSyncPrefsDialog::saveProfile()
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 ;
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index 90fa286..c663d22 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -87,2 +87,3 @@ class KSyncPrefsDialog : public KDialog
QCheckBox* mIncludeInRing;
+ QCheckBox* mIncludeInRingAB;
void addProfile ( KSyncProfile* );
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index d6d8fa3..ea41a85 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -54,2 +54,3 @@ KSyncProfile* KSyncProfile::clone()
myClone->setIncludeInRingSync( mIncludeInRingSync );
+ myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
myClone->setSyncPrefs( mSyncPrefs);
@@ -73,2 +74,3 @@ void KSyncProfile::setDefault()
mIncludeInRingSync = false;
+ mIncludeInRingSyncAB = false;
mSyncPrefs = SYNC_PREF_ASK;
@@ -85,2 +87,3 @@ void KSyncProfile::readConfig(KConfig *config )
mIncludeInRingSync = config->readBoolEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
+ mIncludeInRingSyncAB = config->readBoolEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
mLocalTempFile = config->readEntry( prefix+ "LocalTempFile", mLocalTempFile );
@@ -101,2 +104,3 @@ void KSyncProfile::writeConfig( KConfig * config )
config->writeEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
+ config->writeEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
config->writeEntry( prefix+ "LocalTempFile", mLocalTempFile );
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index 3f7f1ac..df1b49e 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -81,2 +81,4 @@ class KSyncProfile : public QObject {
bool getIncludeInRingSync( ) { return mIncludeInRingSync;}
+ void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;}
+ bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;}
void setSyncPrefs( int n ) { mSyncPrefs= n;}
@@ -93,2 +95,3 @@ class KSyncProfile : public QObject {
bool mIncludeInRingSync;
+ bool mIncludeInRingSyncAB;
int mSyncPrefs;