author | zautrix <zautrix> | 2004-08-01 12:56:11 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-01 12:56:11 (UTC) |
commit | cc2643f4be54269db8c24f66fdcbbf6954d5f537 (patch) (unidiff) | |
tree | 3562598dac624305dfb9fd1911a4b314ae40945d /korganizer/mainwindow.cpp | |
parent | c31e99f265dbe8762efca20667f8ccd973840f8f (diff) | |
download | kdepimpi-cc2643f4be54269db8c24f66fdcbbf6954d5f537.zip kdepimpi-cc2643f4be54269db8c24f66fdcbbf6954d5f537.tar.gz kdepimpi-cc2643f4be54269db8c24f66fdcbbf6954d5f537.tar.bz2 |
Made sync profile dialog korganizer independent
-rw-r--r-- | korganizer/mainwindow.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index a487f14..589ab2d 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -819,9 +819,9 @@ void MainWindow::fillSyncMenu() | |||
819 | syncMenu->insertItem( i18n("Multiple sync"), 1 ); | 819 | syncMenu->insertItem( i18n("Multiple sync"), 1 ); |
820 | syncMenu->insertSeparator(); | 820 | syncMenu->insertSeparator(); |
821 | 821 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); | |
822 | QStringList prof = KOPrefs::instance()->mSyncProfileNames; | 822 | config.setGroup("SyncProfiles"); |
823 | 823 | QStringList prof = config.readListEntry("SyncProfileNames"); | |
824 | |||
824 | if ( prof.count() < 3 ) { | 825 | if ( prof.count() < 3 ) { |
825 | KConfig *config = KOGlobals::config(); | ||
826 | prof.clear(); | 826 | prof.clear(); |
827 | prof << i18n("Sharp-DTM"); | 827 | prof << i18n("Sharp-DTM"); |
@@ -830,14 +830,13 @@ void MainWindow::fillSyncMenu() | |||
830 | KSyncProfile* temp = new KSyncProfile (); | 830 | KSyncProfile* temp = new KSyncProfile (); |
831 | temp->setName( prof[0] ); | 831 | temp->setName( prof[0] ); |
832 | temp->writeConfig(config); | 832 | temp->writeConfig(&config); |
833 | temp->setName( prof[1] ); | 833 | temp->setName( prof[1] ); |
834 | temp->writeConfig(config); | 834 | temp->writeConfig(&config); |
835 | temp->setName( prof[2] ); | 835 | temp->setName( prof[2] ); |
836 | temp->writeConfig(config); | 836 | temp->writeConfig(&config); |
837 | config->sync(); | 837 | config.sync(); |
838 | delete temp; | 838 | delete temp; |
839 | KOPrefs::instance()->mSyncProfileNames = prof; | ||
840 | } | 839 | } |
841 | 840 | KOPrefs::instance()->mSyncProfileNames = prof; | |
842 | int i; | 841 | int i; |
843 | for ( i = 0; i < prof.count(); ++i ) { | 842 | for ( i = 0; i < prof.count(); ++i ) { |
@@ -1801,5 +1800,5 @@ void MainWindow::confSync() | |||
1801 | mView->confSync(); | 1800 | mView->confSync(); |
1802 | fillSyncMenu(); | 1801 | fillSyncMenu(); |
1803 | mView->writeSettings(); | 1802 | //mView->writeSettings(); |
1804 | 1803 | ||
1805 | 1804 | ||