summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Unidiff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index d0d1f3b..298fa82 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -849,32 +849,32 @@ void MainWindow::fillSyncMenu()
849 } 849 }
850 QDir app_dir; 850 QDir app_dir;
851 if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { 851 if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) {
852 syncMenu->setItemEnabled( false , 1000 ); 852 syncMenu->setItemEnabled( false , 1000 );
853 } 853 }
854} 854}
855 855
856int MainWindow::ringSync() 856int MainWindow::ringSync()
857{ 857{
858 int syncedProfiles = 0; 858 int syncedProfiles = 0;
859 int i; 859 int i;
860 QTime timer; 860 QTime timer;
861 KConfig *config = KOGlobals::config(); 861 KConfig config ( locateLocal( "config","syncprofilesrc" ) );
862 QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames; 862 QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames;
863 KSyncProfile* temp = new KSyncProfile (); 863 KSyncProfile* temp = new KSyncProfile ();
864 KOPrefs::instance()->mAskForPreferences = false; 864 KOPrefs::instance()->mAskForPreferences = false;
865 for ( i = 0; i < syncProfileNames.count(); ++i ) { 865 for ( i = 0; i < syncProfileNames.count(); ++i ) {
866 mCurrentSyncProfile = i; 866 mCurrentSyncProfile = i;
867 temp->setName(syncProfileNames[mCurrentSyncProfile]); 867 temp->setName(syncProfileNames[mCurrentSyncProfile]);
868 temp->readConfig(config); 868 temp->readConfig(&config);
869 if ( temp->getIncludeInRingSync() && ( i < 1 || i > 2 )) { 869 if ( temp->getIncludeInRingSync() && ( i < 1 || i > 2 )) {
870 setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); 870 setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... "));
871 ++syncedProfiles; 871 ++syncedProfiles;
872 // KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); 872 // KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences();
873 KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); 873 KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile();
874 KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting(); 874 KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting();
875 KOPrefs::instance()->mShowSyncSummary = false; 875 KOPrefs::instance()->mShowSyncSummary = false;
876 mView->setSyncDevice(syncProfileNames[i] ); 876 mView->setSyncDevice(syncProfileNames[i] );
877 mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); 877 mView->setSyncName( KOPrefs::instance()->mLocalMachineName );
878 if ( i == 0 ) { 878 if ( i == 0 ) {
879 syncSharp(); 879 syncSharp();
880 } else { 880 } else {
@@ -947,28 +947,28 @@ void MainWindow::slotSyncMenu( int action )
947 } 947 }
948 if ( action == 1 ) { 948 if ( action == 1 ) {
949 multiSync( true ); 949 multiSync( true );
950 return; 950 return;
951 } 951 }
952 952
953 if (mBlockSaveFlag) 953 if (mBlockSaveFlag)
954 return; 954 return;
955 mBlockSaveFlag = true; 955 mBlockSaveFlag = true;
956 mCurrentSyncProfile = action - 1000 ; 956 mCurrentSyncProfile = action - 1000 ;
957 mView->setSyncDevice(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile] ); 957 mView->setSyncDevice(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile] );
958 mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); 958 mView->setSyncName( KOPrefs::instance()->mLocalMachineName );
959 KConfig *config = KOGlobals::config(); 959 KConfig config ( locateLocal( "config","syncprofilesrc" ) );
960 KSyncProfile* temp = new KSyncProfile (); 960 KSyncProfile* temp = new KSyncProfile ();
961 temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]); 961 temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]);
962 temp->readConfig(config); 962 temp->readConfig(&config);
963 KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); 963 KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences();
964 KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs(); 964 KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs();
965 KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); 965 KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile();
966 KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting(); 966 KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting();
967 KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync(); 967 KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync();
968 if ( action == 1000 ) { 968 if ( action == 1000 ) {
969 syncSharp(); 969 syncSharp();
970 970
971 } else if ( action == 1001 ) { 971 } else if ( action == 1001 ) {
972 syncLocalFile(); 972 syncLocalFile();
973 973
974 } else if ( action == 1002 ) { 974 } else if ( action == 1002 ) {