-rw-r--r-- | korganizer/mainwindow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 589ab2d..d0d1f3b 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -812,37 +812,39 @@ void MainWindow::initActions() | |||
812 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); | 812 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); |
813 | } | 813 | } |
814 | void MainWindow::fillSyncMenu() | 814 | void MainWindow::fillSyncMenu() |
815 | { | 815 | { |
816 | syncMenu->clear(); | 816 | syncMenu->clear(); |
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 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); | 821 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); |
822 | config.setGroup("SyncProfiles"); | 822 | config.setGroup("SyncProfiles"); |
823 | QStringList prof = config.readListEntry("SyncProfileNames"); | 823 | QStringList prof = config.readListEntry("SyncProfileNames"); |
824 | 824 | KOPrefs::instance()->mLocalMachineName = config.readEntry("LocalMachineName","undefined"); | |
825 | if ( prof.count() < 3 ) { | 825 | if ( prof.count() < 3 ) { |
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.setGroup("SyncProfiles"); | ||
838 | config.writeEntry("SyncProfileNames",prof); | ||
837 | config.sync(); | 839 | config.sync(); |
838 | delete temp; | 840 | delete temp; |
839 | } | 841 | } |
840 | KOPrefs::instance()->mSyncProfileNames = prof; | 842 | KOPrefs::instance()->mSyncProfileNames = prof; |
841 | int i; | 843 | int i; |
842 | for ( i = 0; i < prof.count(); ++i ) { | 844 | for ( i = 0; i < prof.count(); ++i ) { |
843 | 845 | ||
844 | syncMenu->insertItem( prof[i], 1000+i ); | 846 | syncMenu->insertItem( prof[i], 1000+i ); |
845 | if ( i == 2 ) | 847 | if ( i == 2 ) |
846 | syncMenu->insertSeparator(); | 848 | syncMenu->insertSeparator(); |
847 | } | 849 | } |
848 | QDir app_dir; | 850 | QDir app_dir; |