From 062113379f93ed645d2f246183c89eb8b6814834 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 01 Aug 2004 19:29:37 +0000 Subject: sync dialog fixes --- diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 298fa82..44b1264 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -819,14 +819,14 @@ void MainWindow::fillSyncMenu() syncMenu->insertItem( i18n("Multiple sync"), 1 ); syncMenu->insertSeparator(); KConfig config ( locateLocal( "config","syncprofilesrc" ) ); - config.setGroup("SyncProfiles"); + config.setGroup("General"); QStringList prof = config.readListEntry("SyncProfileNames"); KOPrefs::instance()->mLocalMachineName = config.readEntry("LocalMachineName","undefined"); if ( prof.count() < 3 ) { prof.clear(); - prof << i18n("Sharp-DTM"); - prof << i18n("Local file"); - prof << i18n("Last file"); + prof << i18n("Sharp_DTM"); + prof << i18n("Local_file"); + prof << i18n("Last_file"); KSyncProfile* temp = new KSyncProfile (); temp->setName( prof[0] ); temp->writeConfig(&config); @@ -834,7 +834,7 @@ void MainWindow::fillSyncMenu() temp->writeConfig(&config); temp->setName( prof[2] ); temp->writeConfig(&config); - config.setGroup("SyncProfiles"); + config.setGroup("General"); config.writeEntry("SyncProfileNames",prof); config.sync(); delete temp; diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 2f38c83..59c8418 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp @@ -543,7 +543,7 @@ void KSyncPrefsDialog::usrReadConfig() { //KConfig *config = KOGlobals::config(); KConfig config ( locateLocal( "config","syncprofilesrc" ) ); - config.setGroup("SyncProfiles"); + config.setGroup("General"); mSyncProfileNames =config.readListEntry("SyncProfileNames"); mMyMachineName->setText(config.readEntry("LocalMachineName","undefined")); int i; @@ -567,7 +567,6 @@ void KSyncPrefsDialog::usrWriteConfig() profileChanged(currentSelection); //KConfig *config = KOGlobals::config(); KConfig config ( locateLocal( "config","syncprofilesrc" ) ); - config.setGroup("SyncProfiles"); KSyncProfile* prof = mSyncProfiles.first(); while ( prof ) { prof->writeConfig(&config); @@ -575,16 +574,16 @@ void KSyncPrefsDialog::usrWriteConfig() } //KOPrefs::instance()->mSyncProfileNames = mSyncProfileNames; //KOPrefs::instance()->mLocalMachineName = mMyMachineName->text(); + config.setGroup("General"); config.writeEntry("SyncProfileNames",mSyncProfileNames); - QString name = mMyMachineName->text(); - config.writeEntry("LocalMachineName",name); + config.writeEntry("LocalMachineName",mMyMachineName->text()); } void KSyncPrefsDialog::helpDevice() { QString hint = i18n("Insert device where\nphone is connected. E.g.:\n"); #ifdef _WIN32_ - hint += "leave empty for Irda\n" + hint += "Leave empty for Irda.\n" "com1:\n(first serial port)\n" "usb not supported\n" "???\n(bluetooth device address)\n"; diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp index 425285e..fcbb326 100644 --- a/libkdepim/ksyncprofile.cpp +++ b/libkdepim/ksyncprofile.cpp @@ -96,8 +96,8 @@ void KSyncProfile::setDefault() } void KSyncProfile::readConfig(KConfig *config ) { - config->setGroup("SyncProfiles"); - QString prefix = "Profile_"+mName+"_"; + config->setGroup(mName); + QString prefix = ""; //mName = config->readEntry( prefix+ "Name", mName ); mPreSyncCommand = config->readEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); mPostSyncCommand = config->readEntry( prefix+ "PostSyncCommand", mPostSyncCommand );; @@ -127,8 +127,8 @@ void KSyncProfile::readConfig(KConfig *config ) } void KSyncProfile::writeConfig( KConfig * config ) { - config->setGroup("SyncProfiles"); - QString prefix = "Profile_"+mName+"_"; + config->setGroup(mName ); + QString prefix = ""; // config->writeEntry( prefix+ "Name", mName ); config->writeEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); config->writeEntry( prefix+ "PostSyncCommand", mPostSyncCommand ); -- cgit v0.9.0.2