author | zautrix <zautrix> | 2005-07-27 16:02:58 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-27 16:02:58 (UTC) |
commit | 136f9082862e7a56abb3a201e96f5e7386c4f1b9 (patch) (side-by-side diff) | |
tree | ebddba3dd07aa3ac5ea5f75cb962606d84d4fec0 /libkdepim | |
parent | cdd39d566d5d054edf26bd142d6be05cb35451dd (diff) | |
download | kdepimpi-136f9082862e7a56abb3a201e96f5e7386c4f1b9.zip kdepimpi-136f9082862e7a56abb3a201e96f5e7386c4f1b9.tar.gz kdepimpi-136f9082862e7a56abb3a201e96f5e7386c4f1b9.tar.bz2 |
fixxxuuu
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 26 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.h | 2 | ||||
-rw-r--r-- | libkdepim/kdatepicker.cpp | 1 |
3 files changed, 25 insertions, 4 deletions
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 @@ -198,7 +198,7 @@ void KDEPIMConfigWidget::setupStoreTab() } } -#endif +#endif new QLabel( i18n("New dirs are created automatically"), storePage ); QHBox *bb = new QHBox( storePage ); QPushButton * pb; @@ -214,8 +214,14 @@ void KDEPIMConfigWidget::setupStoreTab() connect(pb, SIGNAL( clicked() ), this, SLOT ( setLocalStore() ) ); #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() { @@ -231,6 +237,17 @@ 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(); QString url = mStoreUrl->url(); @@ -244,6 +261,7 @@ void KDEPIMConfigWidget::saveStoreSettings() cfg.writeEntry( "MICROKDEHOME", url ); 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" ); saveStoreSettings(); @@ -841,8 +859,10 @@ 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 @@ -152,7 +152,7 @@ class KDEPIMConfigWidget : public KPrefsWidget QString mSipOtherMessage; QString mSipOtherMessageParameters; - + QLabel* mDataStoragePath; KURLRequester* mBackupUrl; QSpinBox* mBackupDayCountSpin, *mBackupNumbersSpin ; QMap<ExternalAppHandler::Types, QString> mExternalAppsMap; diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp index 7f352d6..25b4e81 100644 --- a/libkdepim/kdatepicker.cpp +++ b/libkdepim/kdatepicker.cpp @@ -477,6 +477,7 @@ void KDatePicker::keyPressEvent ( QKeyEvent * e ) case Qt::Key_Return: case Qt::Key_Enter: + case Qt::Key_Space: tableClickedSlot(); break; case Qt::Key_Escape: |