summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Unidiff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index a487f14..589ab2d 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -817,29 +817,28 @@ void MainWindow::fillSyncMenu()
817 syncMenu->insertItem( i18n("Configure..."), 0 ); 817 syncMenu->insertItem( i18n("Configure..."), 0 );
818 syncMenu->insertSeparator(); 818 syncMenu->insertSeparator();
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 QStringList prof = config.readListEntry("SyncProfileNames");
823 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");
828 prof << i18n("Local file"); 828 prof << i18n("Local file");
829 prof << i18n("Last file"); 829 prof << i18n("Last file");
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 ) {
844 843
845 syncMenu->insertItem( prof[i], 1000+i ); 844 syncMenu->insertItem( prof[i], 1000+i );
@@ -1799,9 +1798,9 @@ void MainWindow::quickSyncLocalFile()
1799void MainWindow::confSync() 1798void MainWindow::confSync()
1800{ 1799{
1801 mView->confSync(); 1800 mView->confSync();
1802 fillSyncMenu(); 1801 fillSyncMenu();
1803 mView->writeSettings(); 1802 //mView->writeSettings();
1804 1803
1805 1804
1806} 1805}
1807void MainWindow::syncRemote( KSyncProfile* prof, bool ask) 1806void MainWindow::syncRemote( KSyncProfile* prof, bool ask)