-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index bbed38d..5cd845e 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -134,28 +134,35 @@ void KDEPIMConfigWidget::setupStoreTab() | |||
134 | new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); | 134 | new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); |
135 | new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); | 135 | new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); |
136 | tabWidget->addTab( storePage, i18n( "Data storage path" ) ); | 136 | tabWidget->addTab( storePage, i18n( "Data storage path" ) ); |
137 | } | 137 | } |
138 | void KDEPIMConfigWidget::setStandardStore() | 138 | void KDEPIMConfigWidget::setStandardStore() |
139 | { | 139 | { |
140 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 140 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
141 | saveStoreSettings(); | 141 | saveStoreSettings(); |
142 | } | 142 | } |
143 | void KDEPIMConfigWidget::saveStoreSettings() | 143 | void KDEPIMConfigWidget::saveStoreSettings() |
144 | { | 144 | { |
145 | if ( !mStoreUrl->url().isEmpty() ) { | 145 | if ( !mStoreUrl->url().isEmpty() ) { |
146 | KConfig cfg ( QDir::homeDirPath() + "/.microkdehome" ); | 146 | QString path = QDir::homeDirPath(); |
147 | QString url = mStoreUrl->url(); | ||
148 | #ifdef DESKTOP_VERSION | ||
149 | if ( url.startsWith( "LOCAL:" ) ) { | ||
150 | path = qApp->applicationDirPath () ; | ||
151 | } | ||
152 | #endif | ||
153 | KConfig cfg ( path + "/.microkdehome" ); | ||
147 | cfg.setGroup("Global"); | 154 | cfg.setGroup("Global"); |
148 | cfg.writeEntry( "MICROKDEHOME", mStoreUrl->url() ); | 155 | cfg.writeEntry( "MICROKDEHOME", url ); |
149 | qDebug("cfg.writeEntry( MICROKDEHOME, mStoreUrl->url() ); "); | 156 | qDebug("cfg.writeEntry( MICROKDEHOME, %s ", url.latin1()); |
150 | cfg.sync(); | 157 | cfg.sync(); |
151 | } else { | 158 | } else { |
152 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 159 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
153 | saveStoreSettings(); | 160 | saveStoreSettings(); |
154 | } | 161 | } |
155 | } | 162 | } |
156 | void KDEPIMConfigWidget::setupExternalAppTab() | 163 | void KDEPIMConfigWidget::setupExternalAppTab() |
157 | { | 164 | { |
158 | QWidget *externalAppsPage = new QWidget( this ); | 165 | QWidget *externalAppsPage = new QWidget( this ); |
159 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), | 166 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), |
160 | KDialog::spacingHintSmall() ); | 167 | KDialog::spacingHintSmall() ); |
161 | 168 | ||