-rw-r--r-- | bin/kdepim/kaddressbook/germantranslation.txt | 1 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 24 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.h | 2 | ||||
-rw-r--r-- | libkdepim/kdatepicker.cpp | 1 |
5 files changed, 26 insertions, 4 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt index 9532759..e874b85 100644 --- a/bin/kdepim/kaddressbook/germantranslation.txt +++ b/bin/kdepim/kaddressbook/germantranslation.txt @@ -808,4 +808,5 @@ { "Sending back file ...","Sende Datei zurück..." },
{ "Eeek, there I am ticklish!","Huch, da bin ich kitzlig!" },
+{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" },
{ "","" },
{ "","" },
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index e699fe9..f3f5333 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1531,5 +1531,5 @@ { "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" }, { "Show times on two lines","Zeige Zeiten auf zwei Zeilen" }, -{ "","" }, +{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, { "","" }, { "","" }, diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index ff1e240..764c495 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp @@ -215,6 +215,12 @@ void KDEPIMConfigWidget::setupStoreTab() #endif new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); - new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); + mDataStoragePath = new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); tabWidget->addTab( storePage, i18n( "Data storage path" ) ); + +#ifdef DESKTOP_VERSION + if ( mStoreUrl->url().startsWith( "LOCAL:" ) ) { + mDataStoragePath->setText( i18n("Settings are stored in\n%1").arg( qApp->applicationDirPath ()+"/.microkdehome" )); + } +#endif } void KDEPIMConfigWidget::setLocalStore() @@ -232,4 +238,15 @@ void KDEPIMConfigWidget::setStandardStore() void KDEPIMConfigWidget::saveStoreSettings() { +#ifdef DESKTOP_VERSION + if ( !mStoreUrl->url().startsWith( "LOCAL:" ) ) { + QString file = qApp->applicationDirPath ()+"/.microkdehome"; + QFileInfo fi ( file ); + if ( fi.exists() ) { + bool res = QFile::remove( file ); + if ( ! res ) + KMessageBox::information( this, i18n("ERROR: Cannot remove file\n%1\nPlease remove it manually.").arg( file )); + } + } +#endif if ( !mStoreUrl->url().isEmpty() ) { QString path = QDir::homeDirPath(); @@ -245,4 +262,5 @@ void KDEPIMConfigWidget::saveStoreSettings() qDebug("cfg.writeEntry( MICROKDEHOME, %s ", url.latin1()); cfg.sync(); + mDataStoragePath->setText( i18n("Settings are stored in\n%1").arg( path+"/.microkdehome" )); } else { mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); @@ -842,6 +860,8 @@ void KDEPIMConfigWidget::usrReadConfig() if (KPimGlobalPrefs::instance()->mBackupUseDefaultDir ) mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); - else + else { mBackupUrl->setURL(prefs->mBackupDatadir); + + } mBackupNumbersSpin->setValue( prefs->mBackupNumbers ); mBackupDayCountSpin->setValue( prefs->mBackupDayCount); diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h index c0b92a9..824ef79 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.h +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h @@ -153,5 +153,5 @@ class KDEPIMConfigWidget : public KPrefsWidget QString mSipOtherMessageParameters; - + QLabel* mDataStoragePath; KURLRequester* mBackupUrl; QSpinBox* mBackupDayCountSpin, *mBackupNumbersSpin ; diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp index 7f352d6..25b4e81 100644 --- a/libkdepim/kdatepicker.cpp +++ b/libkdepim/kdatepicker.cpp @@ -478,4 +478,5 @@ void KDatePicker::keyPressEvent ( QKeyEvent * e ) case Qt::Key_Return: case Qt::Key_Enter: + case Qt::Key_Space: tableClickedSlot(); break; |