summaryrefslogtreecommitdiffabout
path: root/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
Side-by-side diff
Diffstat (limited to 'libkdepim/kcmconfigs/kdepimconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index d097078..6eaf2f2 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -95,59 +95,63 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent,
QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
KDialog::spacingHint() );
tabWidget = new QTabWidget( this );
topLayout->addWidget( tabWidget );
setupLocaleTab();
setupLocaleDateTab();
setupTimeZoneTab();
setupExternalAppTab();
setupStoreTab();
}
void KDEPIMConfigWidget::showTimeZoneTab()
{
tabWidget->setCurrentPage ( 3 ) ;
}
void KDEPIMConfigWidget::setupStoreTab()
{
QVBox *storePage = new QVBox( this );
new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage );
- new QLabel( i18n("<b>Set new data storage dir:</b>"), storePage );
+ new QLabel( i18n("<b>New data storage dir:</b>"), storePage );
mStoreUrl = new KURLRequester( storePage );
mStoreUrl->setURL( KGlobal::dirs()->localkdedir() );
- new QLabel( i18n("Not existing dirs are created automatically"), storePage );
+ new QLabel( i18n("New dirs are created automatically"), storePage );
QHBox *bb = new QHBox( storePage );
- QPushButton * pb = new QPushButton ( i18n("Save settings"), bb );
+ QPushButton * pb;
+ if ( QApplication::desktop()->width() < 640 )
+ pb = new QPushButton ( i18n("Save"), bb );
+ else
+ pb = new QPushButton ( i18n("Save settings"), bb );
connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) );
pb = new QPushButton ( i18n("Save standard"), bb );
connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) );
new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage );
- new QLabel( i18n("The settings of the storage\ndir is saved in the file\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage );
+ new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage );
tabWidget->addTab( storePage, i18n( "Data storage path" ) );
}
void KDEPIMConfigWidget::setStandardStore()
{
mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" );
saveStoreSettings();
}
void KDEPIMConfigWidget::saveStoreSettings()
{
if ( !mStoreUrl->url().isEmpty() ) {
KConfig cfg ( QDir::homeDirPath() + "/.microkdehome" );
cfg.setGroup("Global");
cfg.writeEntry( "MICROKDEHOME", mStoreUrl->url() );
qDebug("cfg.writeEntry( MICROKDEHOME, mStoreUrl->url() ); ");
cfg.sync();
} else {
mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" );
saveStoreSettings();
}
}
void KDEPIMConfigWidget::setupExternalAppTab()
{
QWidget *externalAppsPage = new QWidget( this );
QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(),