author | zautrix <zautrix> | 2004-08-01 19:29:37 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-01 19:29:37 (UTC) |
commit | 062113379f93ed645d2f246183c89eb8b6814834 (patch) (unidiff) | |
tree | 34e3a96d06b40d24c19c4e6814a65f290734563d /libkdepim | |
parent | 3bdbe8154381abc3fca2aaf5c055b59c2f8637a2 (diff) | |
download | kdepimpi-062113379f93ed645d2f246183c89eb8b6814834.zip kdepimpi-062113379f93ed645d2f246183c89eb8b6814834.tar.gz kdepimpi-062113379f93ed645d2f246183c89eb8b6814834.tar.bz2 |
sync dialog fixes
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 9 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.cpp | 8 |
2 files changed, 8 insertions, 9 deletions
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() | |||
543 | { | 543 | { |
544 | //KConfig *config = KOGlobals::config(); | 544 | //KConfig *config = KOGlobals::config(); |
545 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); | 545 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); |
546 | config.setGroup("SyncProfiles"); | 546 | config.setGroup("General"); |
547 | mSyncProfileNames =config.readListEntry("SyncProfileNames"); | 547 | mSyncProfileNames =config.readListEntry("SyncProfileNames"); |
548 | mMyMachineName->setText(config.readEntry("LocalMachineName","undefined")); | 548 | mMyMachineName->setText(config.readEntry("LocalMachineName","undefined")); |
549 | int i; | 549 | int i; |
@@ -567,7 +567,6 @@ void KSyncPrefsDialog::usrWriteConfig() | |||
567 | profileChanged(currentSelection); | 567 | profileChanged(currentSelection); |
568 | //KConfig *config = KOGlobals::config(); | 568 | //KConfig *config = KOGlobals::config(); |
569 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); | 569 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); |
570 | config.setGroup("SyncProfiles"); | ||
571 | KSyncProfile* prof = mSyncProfiles.first(); | 570 | KSyncProfile* prof = mSyncProfiles.first(); |
572 | while ( prof ) { | 571 | while ( prof ) { |
573 | prof->writeConfig(&config); | 572 | prof->writeConfig(&config); |
@@ -575,16 +574,16 @@ void KSyncPrefsDialog::usrWriteConfig() | |||
575 | } | 574 | } |
576 | //KOPrefs::instance()->mSyncProfileNames = mSyncProfileNames; | 575 | //KOPrefs::instance()->mSyncProfileNames = mSyncProfileNames; |
577 | //KOPrefs::instance()->mLocalMachineName = mMyMachineName->text(); | 576 | //KOPrefs::instance()->mLocalMachineName = mMyMachineName->text(); |
577 | config.setGroup("General"); | ||
578 | config.writeEntry("SyncProfileNames",mSyncProfileNames); | 578 | config.writeEntry("SyncProfileNames",mSyncProfileNames); |
579 | QString name = mMyMachineName->text(); | 579 | config.writeEntry("LocalMachineName",mMyMachineName->text()); |
580 | config.writeEntry("LocalMachineName",name); | ||
581 | } | 580 | } |
582 | 581 | ||
583 | void KSyncPrefsDialog::helpDevice() | 582 | void KSyncPrefsDialog::helpDevice() |
584 | { | 583 | { |
585 | QString hint = i18n("Insert device where\nphone is connected. E.g.:\n"); | 584 | QString hint = i18n("Insert device where\nphone is connected. E.g.:\n"); |
586 | #ifdef _WIN32_ | 585 | #ifdef _WIN32_ |
587 | hint += "leave empty for Irda\n" | 586 | hint += "Leave empty for Irda.\n" |
588 | "com1:\n(first serial port)\n" | 587 | "com1:\n(first serial port)\n" |
589 | "usb not supported\n" | 588 | "usb not supported\n" |
590 | "???\n(bluetooth device address)\n"; | 589 | "???\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() | |||
96 | } | 96 | } |
97 | void KSyncProfile::readConfig(KConfig *config ) | 97 | void KSyncProfile::readConfig(KConfig *config ) |
98 | { | 98 | { |
99 | config->setGroup("SyncProfiles"); | 99 | config->setGroup(mName); |
100 | QString prefix = "Profile_"+mName+"_"; | 100 | QString prefix = ""; |
101 | //mName = config->readEntry( prefix+ "Name", mName ); | 101 | //mName = config->readEntry( prefix+ "Name", mName ); |
102 | mPreSyncCommand = config->readEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); | 102 | mPreSyncCommand = config->readEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); |
103 | mPostSyncCommand = config->readEntry( prefix+ "PostSyncCommand", mPostSyncCommand );; | 103 | mPostSyncCommand = config->readEntry( prefix+ "PostSyncCommand", mPostSyncCommand );; |
@@ -127,8 +127,8 @@ void KSyncProfile::readConfig(KConfig *config ) | |||
127 | } | 127 | } |
128 | void KSyncProfile::writeConfig( KConfig * config ) | 128 | void KSyncProfile::writeConfig( KConfig * config ) |
129 | { | 129 | { |
130 | config->setGroup("SyncProfiles"); | 130 | config->setGroup(mName ); |
131 | QString prefix = "Profile_"+mName+"_"; | 131 | QString prefix = ""; |
132 | // config->writeEntry( prefix+ "Name", mName ); | 132 | // config->writeEntry( prefix+ "Name", mName ); |
133 | config->writeEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); | 133 | config->writeEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); |
134 | config->writeEntry( prefix+ "PostSyncCommand", mPostSyncCommand ); | 134 | config->writeEntry( prefix+ "PostSyncCommand", mPostSyncCommand ); |