summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-08-01 19:29:37 (UTC)
committer zautrix <zautrix>2004-08-01 19:29:37 (UTC)
commit062113379f93ed645d2f246183c89eb8b6814834 (patch) (side-by-side diff)
tree34e3a96d06b40d24c19c4e6814a65f290734563d
parent3bdbe8154381abc3fca2aaf5c055b59c2f8637a2 (diff)
downloadkdepimpi-062113379f93ed645d2f246183c89eb8b6814834.zip
kdepimpi-062113379f93ed645d2f246183c89eb8b6814834.tar.gz
kdepimpi-062113379f93ed645d2f246183c89eb8b6814834.tar.bz2
sync dialog fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp10
-rw-r--r--libkdepim/ksyncprefsdialog.cpp9
-rw-r--r--libkdepim/ksyncprofile.cpp8
3 files changed, 13 insertions, 14 deletions
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 );