author | zautrix <zautrix> | 2005-01-29 07:48:23 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-29 07:48:23 (UTC) |
commit | ef1d97a243957180f5ffc3c3b055ffd8bf52e157 (patch) (unidiff) | |
tree | 57ebf97cfd0d324ffcecbfb0c9814745f73d54a5 /libkdepim/kcmconfigs | |
parent | 0850ade22908615389800c6ee973f5906154d980 (diff) | |
download | kdepimpi-ef1d97a243957180f5ffc3c3b055ffd8bf52e157.zip kdepimpi-ef1d97a243957180f5ffc3c3b055ffd8bf52e157.tar.gz kdepimpi-ef1d97a243957180f5ffc3c3b055ffd8bf52e157.tar.bz2 |
many stribg fixes
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 12 |
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, | |||
95 | 95 | ||
96 | 96 | ||
97 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, | 97 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, |
98 | KDialog::spacingHint() ); | 98 | KDialog::spacingHint() ); |
99 | 99 | ||
100 | tabWidget = new QTabWidget( this ); | 100 | tabWidget = new QTabWidget( this ); |
101 | topLayout->addWidget( tabWidget ); | 101 | topLayout->addWidget( tabWidget ); |
102 | 102 | ||
103 | 103 | ||
104 | setupLocaleTab(); | 104 | setupLocaleTab(); |
105 | setupLocaleDateTab(); | 105 | setupLocaleDateTab(); |
106 | setupTimeZoneTab(); | 106 | setupTimeZoneTab(); |
107 | setupExternalAppTab(); | 107 | setupExternalAppTab(); |
108 | setupStoreTab(); | 108 | setupStoreTab(); |
109 | 109 | ||
110 | } | 110 | } |
111 | void KDEPIMConfigWidget::showTimeZoneTab() | 111 | void KDEPIMConfigWidget::showTimeZoneTab() |
112 | { | 112 | { |
113 | tabWidget->setCurrentPage ( 3 ) ; | 113 | tabWidget->setCurrentPage ( 3 ) ; |
114 | } | 114 | } |
115 | void KDEPIMConfigWidget::setupStoreTab() | 115 | void KDEPIMConfigWidget::setupStoreTab() |
116 | { | 116 | { |
117 | QVBox *storePage = new QVBox( this ); | 117 | QVBox *storePage = new QVBox( this ); |
118 | 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 ); | 118 | 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 ); |
119 | new QLabel( i18n("<b>Set new data storage dir:</b>"), storePage ); | 119 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); |
120 | mStoreUrl = new KURLRequester( storePage ); | 120 | mStoreUrl = new KURLRequester( storePage ); |
121 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); | 121 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); |
122 | new QLabel( i18n("Not existing dirs are created automatically"), storePage ); | 122 | new QLabel( i18n("New dirs are created automatically"), storePage ); |
123 | QHBox *bb = new QHBox( storePage ); | 123 | QHBox *bb = new QHBox( storePage ); |
124 | QPushButton * pb = new QPushButton ( i18n("Save settings"), bb ); | 124 | QPushButton * pb; |
125 | if ( QApplication::desktop()->width() < 640 ) | ||
126 | pb = new QPushButton ( i18n("Save"), bb ); | ||
127 | else | ||
128 | pb = new QPushButton ( i18n("Save settings"), bb ); | ||
125 | connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) ); | 129 | connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) ); |
126 | pb = new QPushButton ( i18n("Save standard"), bb ); | 130 | pb = new QPushButton ( i18n("Save standard"), bb ); |
127 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) ); | 131 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) ); |
128 | new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); | 132 | new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); |
129 | new QLabel( i18n("The settings of the storage\ndir is saved in the file\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); | 133 | new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); |
130 | tabWidget->addTab( storePage, i18n( "Data storage path" ) ); | 134 | tabWidget->addTab( storePage, i18n( "Data storage path" ) ); |
131 | } | 135 | } |
132 | void KDEPIMConfigWidget::setStandardStore() | 136 | void KDEPIMConfigWidget::setStandardStore() |
133 | { | 137 | { |
134 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 138 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
135 | saveStoreSettings(); | 139 | saveStoreSettings(); |
136 | } | 140 | } |
137 | void KDEPIMConfigWidget::saveStoreSettings() | 141 | void KDEPIMConfigWidget::saveStoreSettings() |
138 | { | 142 | { |
139 | if ( !mStoreUrl->url().isEmpty() ) { | 143 | if ( !mStoreUrl->url().isEmpty() ) { |
140 | KConfig cfg ( QDir::homeDirPath() + "/.microkdehome" ); | 144 | KConfig cfg ( QDir::homeDirPath() + "/.microkdehome" ); |
141 | cfg.setGroup("Global"); | 145 | cfg.setGroup("Global"); |
142 | cfg.writeEntry( "MICROKDEHOME", mStoreUrl->url() ); | 146 | cfg.writeEntry( "MICROKDEHOME", mStoreUrl->url() ); |
143 | qDebug("cfg.writeEntry( MICROKDEHOME, mStoreUrl->url() ); "); | 147 | qDebug("cfg.writeEntry( MICROKDEHOME, mStoreUrl->url() ); "); |
144 | cfg.sync(); | 148 | cfg.sync(); |
145 | } else { | 149 | } else { |
146 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 150 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
147 | saveStoreSettings(); | 151 | saveStoreSettings(); |
148 | } | 152 | } |
149 | } | 153 | } |
150 | void KDEPIMConfigWidget::setupExternalAppTab() | 154 | void KDEPIMConfigWidget::setupExternalAppTab() |
151 | { | 155 | { |
152 | QWidget *externalAppsPage = new QWidget( this ); | 156 | QWidget *externalAppsPage = new QWidget( this ); |
153 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), | 157 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), |