-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 4fe1e66..d62d9f9 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -113,193 +113,193 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, | |||
113 | } | 113 | } |
114 | void KDEPIMConfigWidget::showTimeZoneTab() | 114 | void KDEPIMConfigWidget::showTimeZoneTab() |
115 | { | 115 | { |
116 | tabWidget->setCurrentPage ( 3 ) ; | 116 | tabWidget->setCurrentPage ( 3 ) ; |
117 | } | 117 | } |
118 | void KDEPIMConfigWidget::setupStoreTab() | 118 | void KDEPIMConfigWidget::setupStoreTab() |
119 | { | 119 | { |
120 | QVBox *storePage = new QVBox( this ); | 120 | QVBox *storePage = new QVBox( this ); |
121 | 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 ); | 121 | 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 ); |
122 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); | 122 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); |
123 | mStoreUrl = new KURLRequester( storePage ); | 123 | mStoreUrl = new KURLRequester( storePage ); |
124 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); | 124 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); |
125 | #ifdef DESKTOP_VERSION | 125 | #ifdef DESKTOP_VERSION |
126 | QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; | 126 | QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; |
127 | QFileInfo fi ( confFile ); | 127 | QFileInfo fi ( confFile ); |
128 | if ( fi.exists() ) { | 128 | if ( fi.exists() ) { |
129 | KConfig cfg ( confFile ); | 129 | KConfig cfg ( confFile ); |
130 | cfg.setGroup("Global"); | 130 | cfg.setGroup("Global"); |
131 | QString localKdeDir = cfg.readEntry( "MICROKDEHOME", "x_x_x" ); | 131 | QString localKdeDir = cfg.readEntry( "MICROKDEHOME", "x_x_x" ); |
132 | if ( localKdeDir != "x_x_x" ) { | 132 | if ( localKdeDir != "x_x_x" ) { |
133 | mStoreUrl->setURL( localKdeDir ); | 133 | mStoreUrl->setURL( localKdeDir ); |
134 | qDebug("Reading config from %s ", confFile.latin1()); | 134 | qDebug("Reading config from %s ", confFile.latin1()); |
135 | } | 135 | } |
136 | } | 136 | } |
137 | 137 | ||
138 | #endif | 138 | #endif |
139 | new QLabel( i18n("New dirs are created automatically"), storePage ); | 139 | new QLabel( i18n("New dirs are created automatically"), storePage ); |
140 | QHBox *bb = new QHBox( storePage ); | 140 | QHBox *bb = new QHBox( storePage ); |
141 | QPushButton * pb; | 141 | QPushButton * pb; |
142 | if ( QApplication::desktop()->width() < 640 ) | 142 | if ( QApplication::desktop()->width() < 640 ) |
143 | pb = new QPushButton ( i18n("Save"), bb ); | 143 | pb = new QPushButton ( i18n("Save"), bb ); |
144 | else | 144 | else |
145 | pb = new QPushButton ( i18n("Save settings"), bb ); | 145 | pb = new QPushButton ( i18n("Save settings"), bb ); |
146 | connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) ); | 146 | connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) ); |
147 | pb = new QPushButton ( i18n("Save standard"), bb ); | 147 | pb = new QPushButton ( i18n("Save standard"), bb ); |
148 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) ); | 148 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) ); |
149 | #ifdef DESKTOP_VERSION | 149 | #ifdef DESKTOP_VERSION |
150 | pb = new QPushButton ( i18n("Save using LOCAL storage"), bb ); | 150 | pb = new QPushButton ( i18n("Save using LOCAL storage"), bb ); |
151 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setLocalStore() ) ); | 151 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setLocalStore() ) ); |
152 | #endif | 152 | #endif |
153 | new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); | 153 | new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); |
154 | new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); | 154 | new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); |
155 | tabWidget->addTab( storePage, i18n( "Data storage path" ) ); | 155 | tabWidget->addTab( storePage, i18n( "Data storage path" ) ); |
156 | } | 156 | } |
157 | void KDEPIMConfigWidget::setLocalStore() | 157 | void KDEPIMConfigWidget::setLocalStore() |
158 | { | 158 | { |
159 | mStoreUrl->setURL( "LOCAL:kdepimpi" ); | 159 | mStoreUrl->setURL( "LOCAL:kdepimpi" ); |
160 | saveStoreSettings(); | 160 | saveStoreSettings(); |
161 | QString message = i18n("'LOCAL' mode makes is possible to run\nKA/Pi and KO/Pi from a USB memory stick.\nIn LOCAL mode the data is stored\nin a path relative to the executable.\nNote, that in LOCAL mode only addressbook\nresource files in\n <path of the executable>/<dirname after LOCAL:>/apps/kabc/*.vcf\n are supported.\nIf you use the standard addressbook settings\nyou do not have to reconfigure any path,\njust restart the application and import\nyour addressbook and calendar data."); | 161 | QString message = i18n("'LOCAL' mode makes is possible to run\nKA/Pi and KO/Pi from a USB memory stick.\nIn LOCAL mode the data is stored\nin a path relative to the executable.\nNote, that in LOCAL mode only addressbook\nresource files in\n <path of the executable>/<dirname after LOCAL:>/apps/kabc/*.vcf\n are supported.\nIf you use the standard addressbook settings\nyou do not have to reconfigure any path,\njust restart the application and import\nyour addressbook and calendar data."); |
162 | KMessageBox::information( this, message); | 162 | KMessageBox::information( this, message); |
163 | } | 163 | } |
164 | void KDEPIMConfigWidget::setStandardStore() | 164 | void KDEPIMConfigWidget::setStandardStore() |
165 | { | 165 | { |
166 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 166 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
167 | saveStoreSettings(); | 167 | saveStoreSettings(); |
168 | } | 168 | } |
169 | void KDEPIMConfigWidget::saveStoreSettings() | 169 | void KDEPIMConfigWidget::saveStoreSettings() |
170 | { | 170 | { |
171 | if ( !mStoreUrl->url().isEmpty() ) { | 171 | if ( !mStoreUrl->url().isEmpty() ) { |
172 | QString path = QDir::homeDirPath(); | 172 | QString path = QDir::homeDirPath(); |
173 | QString url = mStoreUrl->url(); | 173 | QString url = mStoreUrl->url(); |
174 | #ifdef DESKTOP_VERSION | 174 | #ifdef DESKTOP_VERSION |
175 | if ( url.startsWith( "LOCAL:" ) ) { | 175 | if ( url.startsWith( "LOCAL:" ) ) { |
176 | path = qApp->applicationDirPath () ; | 176 | path = qApp->applicationDirPath () ; |
177 | } | 177 | } |
178 | #endif | 178 | #endif |
179 | KConfig cfg ( path + "/.microkdehome" ); | 179 | KConfig cfg ( path + "/.microkdehome" ); |
180 | cfg.setGroup("Global"); | 180 | cfg.setGroup("Global"); |
181 | cfg.writeEntry( "MICROKDEHOME", url ); | 181 | cfg.writeEntry( "MICROKDEHOME", url ); |
182 | qDebug("cfg.writeEntry( MICROKDEHOME, %s ", url.latin1()); | 182 | qDebug("cfg.writeEntry( MICROKDEHOME, %s ", url.latin1()); |
183 | cfg.sync(); | 183 | cfg.sync(); |
184 | } else { | 184 | } else { |
185 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 185 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
186 | saveStoreSettings(); | 186 | saveStoreSettings(); |
187 | } | 187 | } |
188 | } | 188 | } |
189 | void KDEPIMConfigWidget::setupExternalAppTab() | 189 | void KDEPIMConfigWidget::setupExternalAppTab() |
190 | { | 190 | { |
191 | QWidget *externalAppsPage = new QWidget( this ); | 191 | QWidget *externalAppsPage = new QWidget( this ); |
192 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), | 192 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), |
193 | KDialog::spacingHintSmall() ); | 193 | KDialog::spacingHintSmall() ); |
194 | 194 | ||
195 | mExternalApps = new QComboBox( externalAppsPage ); | 195 | mExternalApps = new QComboBox( externalAppsPage ); |
196 | 196 | ||
197 | QMap<ExternalAppHandler::Types, QString>::Iterator it; | 197 | QMap<ExternalAppHandler::Types, QString>::Iterator it; |
198 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) | 198 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) |
199 | mExternalApps->insertItem( it.data(), it.key() ); | 199 | mExternalApps->insertItem( it.data(), it.key() ); |
200 | 200 | ||
201 | layout->addWidget( mExternalApps ); | 201 | layout->addWidget( mExternalApps ); |
202 | 202 | ||
203 | connect( mExternalApps, SIGNAL( activated( int ) ), | 203 | connect( mExternalApps, SIGNAL( activated( int ) ), |
204 | this, SLOT (externalapp_changed( int ) ) ); | 204 | this, SLOT (externalapp_changed( int ) ) ); |
205 | 205 | ||
206 | 206 | ||
207 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); | 207 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); |
208 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); | 208 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); |
209 | mExternalAppGroupBox->layout()->setMargin(5); | 209 | mExternalAppGroupBox->layout()->setMargin(4); |
210 | 210 | ||
211 | mClient = new QComboBox( mExternalAppGroupBox ); | 211 | mClient = new QComboBox( mExternalAppGroupBox ); |
212 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); | 212 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); |
213 | 213 | ||
214 | connect( mClient, SIGNAL( activated( int ) ), | 214 | connect( mClient, SIGNAL( activated( int ) ), |
215 | this, SLOT (client_changed( int ) ) ); | 215 | this, SLOT (client_changed( int ) ) ); |
216 | 216 | ||
217 | QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); | 217 | QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); |
218 | boxLayout->addWidget( lab, 1, 0 ); | 218 | boxLayout->addWidget( lab, 1, 0 ); |
219 | mChannel = new QLineEdit(mExternalAppGroupBox); | 219 | mChannel = new QLineEdit(mExternalAppGroupBox); |
220 | mChannel->setReadOnly(true); | 220 | mChannel->setReadOnly(true); |
221 | boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); | 221 | boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); |
222 | 222 | ||
223 | lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); | 223 | lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); |
224 | boxLayout->addWidget( lab, 3, 0 ); | 224 | boxLayout->addWidget( lab, 3, 0 ); |
225 | mMessage = new QLineEdit(mExternalAppGroupBox); | 225 | mMessage = new QLineEdit(mExternalAppGroupBox); |
226 | mMessage->setReadOnly(true); | 226 | mMessage->setReadOnly(true); |
227 | boxLayout->addWidget( mMessage , 4, 0); | 227 | boxLayout->addWidget( mMessage , 4, 0); |
228 | 228 | ||
229 | lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); | 229 | lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); |
230 | boxLayout->addWidget( lab, 3, 1 ); | 230 | boxLayout->addWidget( lab, 3, 1 ); |
231 | mParameters = new QLineEdit(mExternalAppGroupBox); | 231 | mParameters = new QLineEdit(mExternalAppGroupBox); |
232 | mParameters->setReadOnly(true); | 232 | mParameters->setReadOnly(true); |
233 | boxLayout->addWidget( mParameters, 4, 1 ); | 233 | boxLayout->addWidget( mParameters, 4, 1 ); |
234 | 234 | ||
235 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); | 235 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); |
236 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); | 236 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); |
237 | 237 | ||
238 | 238 | ||
239 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); | 239 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); |
240 | boxLayout->addWidget( lab, 6, 0 ); | 240 | boxLayout->addWidget( lab, 6, 0 ); |
241 | mMessage2 = new QLineEdit(mExternalAppGroupBox); | 241 | mMessage2 = new QLineEdit(mExternalAppGroupBox); |
242 | mMessage2->setReadOnly(true); | 242 | mMessage2->setReadOnly(true); |
243 | boxLayout->addWidget( mMessage2 , 7, 0); | 243 | boxLayout->addWidget( mMessage2 , 7, 0); |
244 | 244 | ||
245 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); | 245 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); |
246 | boxLayout->addWidget( lab, 6, 1 ); | 246 | boxLayout->addWidget( lab, 6, 1 ); |
247 | mParameters2 = new QLineEdit(mExternalAppGroupBox); | 247 | mParameters2 = new QLineEdit(mExternalAppGroupBox); |
248 | mParameters2->setReadOnly(true); | 248 | mParameters2->setReadOnly(true); |
249 | boxLayout->addWidget( mParameters2, 7, 1 ); | 249 | boxLayout->addWidget( mParameters2, 7, 1 ); |
250 | 250 | ||
251 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); | 251 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); |
252 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); | 252 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); |
253 | 253 | ||
254 | 254 | ||
255 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 255 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
256 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 256 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
257 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 257 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
258 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 258 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
259 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 259 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
260 | 260 | ||
261 | 261 | ||
262 | layout->addWidget( mExternalAppGroupBox ); | 262 | layout->addWidget( mExternalAppGroupBox ); |
263 | tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); | 263 | tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); |
264 | 264 | ||
265 | } | 265 | } |
266 | 266 | ||
267 | 267 | ||
268 | void KDEPIMConfigWidget::setupLocaleDateTab() | 268 | void KDEPIMConfigWidget::setupLocaleDateTab() |
269 | { | 269 | { |
270 | QWidget *topFrame = new QWidget( this ); | 270 | QWidget *topFrame = new QWidget( this ); |
271 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); | 271 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); |
272 | 272 | ||
273 | topLayout->setSpacing(KDialog::spacingHintSmall()); | 273 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
274 | topLayout->setMargin(KDialog::marginHintSmall()); | 274 | topLayout->setMargin(KDialog::marginHintSmall()); |
275 | int iii = 0; | 275 | int iii = 0; |
276 | 276 | ||
277 | 277 | ||
278 | KPrefsWidRadios *syncPrefsGroup = | 278 | KPrefsWidRadios *syncPrefsGroup = |
279 | addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); | 279 | addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); |
280 | QString format; | 280 | QString format; |
281 | if ( QApplication::desktop()->width() < 480 ) | 281 | if ( QApplication::desktop()->width() < 480 ) |
282 | format = "(%d.%m.%Y)"; | 282 | format = "(%d.%m.%Y)"; |
283 | else | 283 | else |
284 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 284 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
285 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 285 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
286 | if ( QApplication::desktop()->width() < 480 ) | 286 | if ( QApplication::desktop()->width() < 480 ) |
287 | format = "(%m.%d.%Y)"; | 287 | format = "(%m.%d.%Y)"; |
288 | else | 288 | else |
289 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 289 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
290 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 290 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
291 | if ( QApplication::desktop()->width() < 480 ) | 291 | if ( QApplication::desktop()->width() < 480 ) |
292 | format = "(%Y-%m-%d)"; | 292 | format = "(%Y-%m-%d)"; |
293 | else | 293 | else |
294 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 294 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
295 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 295 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
296 | syncPrefsGroup->addRadio(i18n("User defined")); | 296 | syncPrefsGroup->addRadio(i18n("User defined")); |
297 | if ( QApplication::desktop()->width() < 480 ) { | 297 | if ( QApplication::desktop()->width() < 480 ) { |
298 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); | 298 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); |
299 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); | 299 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); |
300 | } | 300 | } |
301 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 301 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
302 | ++iii; | 302 | ++iii; |
303 | ++iii; | 303 | ++iii; |
304 | QLabel * lab; | 304 | QLabel * lab; |
305 | mUserDateFormatLong = new QLineEdit(topFrame); | 305 | mUserDateFormatLong = new QLineEdit(topFrame); |