author | zautrix <zautrix> | 2005-03-30 00:57:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-30 00:57:42 (UTC) |
commit | 889d2102fcfe2fb0786b3f8f406dc32b42e38c7a (patch) (unidiff) | |
tree | 32b269c1140a5646a00b65c78ac71116adb91aa1 /libkdepim | |
parent | 99324133d35ba588b688bc5b22788fd8fb9e752d (diff) | |
download | kdepimpi-889d2102fcfe2fb0786b3f8f406dc32b42e38c7a.zip kdepimpi-889d2102fcfe2fb0786b3f8f406dc32b42e38c7a.tar.gz kdepimpi-889d2102fcfe2fb0786b3f8f406dc32b42e38c7a.tar.bz2 |
fixes
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index bbed38d..5cd845e 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -18,260 +18,267 @@ | |||
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qtabwidget.h> | 32 | #include <qtabwidget.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qgroupbox.h> | 34 | #include <qgroupbox.h> |
35 | #include <qlabel.h> | 35 | #include <qlabel.h> |
36 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
37 | #include <qbuttongroup.h> | 37 | #include <qbuttongroup.h> |
38 | #include <qfile.h> | 38 | #include <qfile.h> |
39 | #include <qvbox.h> | 39 | #include <qvbox.h> |
40 | #include <qdir.h> | 40 | #include <qdir.h> |
41 | #include <qregexp.h> | 41 | #include <qregexp.h> |
42 | 42 | ||
43 | #include <kdialog.h> | 43 | #include <kdialog.h> |
44 | #include <kprefsdialog.h> | 44 | #include <kprefsdialog.h> |
45 | #include <klocale.h> | 45 | #include <klocale.h> |
46 | #include <kdateedit.h> | 46 | #include <kdateedit.h> |
47 | #include <kglobal.h> | 47 | #include <kglobal.h> |
48 | #include <stdlib.h> | 48 | #include <stdlib.h> |
49 | 49 | ||
50 | /*US | 50 | /*US |
51 | #include <qcheckbox.h> | 51 | #include <qcheckbox.h> |
52 | #include <qframe.h> | 52 | #include <qframe.h> |
53 | #include <qpushbutton.h> | 53 | #include <qpushbutton.h> |
54 | #include <qcombobox.h> | 54 | #include <qcombobox.h> |
55 | #include <qlineedit.h> | 55 | #include <qlineedit.h> |
56 | #include <qlabel.h> | 56 | #include <qlabel.h> |
57 | #include <qfile.h> | 57 | #include <qfile.h> |
58 | 58 | ||
59 | #include <kconfig.h> | 59 | #include <kconfig.h> |
60 | #include <kdebug.h> | 60 | #include <kdebug.h> |
61 | #include <kdialog.h> | 61 | #include <kdialog.h> |
62 | #include <klistview.h> | 62 | #include <klistview.h> |
63 | #include <klocale.h> | 63 | #include <klocale.h> |
64 | #include <kglobal.h> | 64 | #include <kglobal.h> |
65 | #include <kmessagebox.h> | 65 | #include <kmessagebox.h> |
66 | #include <kstandarddirs.h> | 66 | #include <kstandarddirs.h> |
67 | 67 | ||
68 | #ifndef KAB_EMBEDDED | 68 | #ifndef KAB_EMBEDDED |
69 | #include <ktrader.h> | 69 | #include <ktrader.h> |
70 | #else // KAB_EMBEDDED | 70 | #else // KAB_EMBEDDED |
71 | #include <mergewidget.h> | 71 | #include <mergewidget.h> |
72 | #include <distributionlistwidget.h> | 72 | #include <distributionlistwidget.h> |
73 | #endif // KAB_EMBEDDED | 73 | #endif // KAB_EMBEDDED |
74 | 74 | ||
75 | #include "addresseewidget.h" | 75 | #include "addresseewidget.h" |
76 | #include "extensionconfigdialog.h" | 76 | #include "extensionconfigdialog.h" |
77 | #include "extensionwidget.h" | 77 | #include "extensionwidget.h" |
78 | */ | 78 | */ |
79 | 79 | ||
80 | #include "qapplication.h" | 80 | #include "qapplication.h" |
81 | 81 | ||
82 | #include "kpimglobalprefs.h" | 82 | #include "kpimglobalprefs.h" |
83 | 83 | ||
84 | #include "kdepimconfigwidget.h" | 84 | #include "kdepimconfigwidget.h" |
85 | #include <kprefs.h> | 85 | #include <kprefs.h> |
86 | 86 | ||
87 | 87 | ||
88 | KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) | 88 | KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) |
89 | : KPrefsWidget(prefs, parent, name ) | 89 | : KPrefsWidget(prefs, parent, name ) |
90 | { | 90 | { |
91 | mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); | 91 | mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); |
92 | mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); | 92 | mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); |
93 | mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); | 93 | mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); |
94 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); | 94 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); |
95 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); | 95 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); |
96 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); | 96 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); |
97 | 97 | ||
98 | 98 | ||
99 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, | 99 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, |
100 | KDialog::spacingHint() ); | 100 | KDialog::spacingHint() ); |
101 | 101 | ||
102 | tabWidget = new QTabWidget( this ); | 102 | tabWidget = new QTabWidget( this ); |
103 | topLayout->addWidget( tabWidget ); | 103 | topLayout->addWidget( tabWidget ); |
104 | 104 | ||
105 | 105 | ||
106 | setupLocaleTab(); | 106 | setupLocaleTab(); |
107 | setupLocaleDateTab(); | 107 | setupLocaleDateTab(); |
108 | setupTimeZoneTab(); | 108 | setupTimeZoneTab(); |
109 | setupExternalAppTab(); | 109 | setupExternalAppTab(); |
110 | setupStoreTab(); | 110 | setupStoreTab(); |
111 | 111 | ||
112 | } | 112 | } |
113 | void KDEPIMConfigWidget::showTimeZoneTab() | 113 | void KDEPIMConfigWidget::showTimeZoneTab() |
114 | { | 114 | { |
115 | tabWidget->setCurrentPage ( 3 ) ; | 115 | tabWidget->setCurrentPage ( 3 ) ; |
116 | } | 116 | } |
117 | void KDEPIMConfigWidget::setupStoreTab() | 117 | void KDEPIMConfigWidget::setupStoreTab() |
118 | { | 118 | { |
119 | QVBox *storePage = new QVBox( this ); | 119 | QVBox *storePage = new QVBox( this ); |
120 | 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 ); | 120 | 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("<b>New data storage dir:</b>"), storePage ); | 121 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); |
122 | mStoreUrl = new KURLRequester( storePage ); | 122 | mStoreUrl = new KURLRequester( storePage ); |
123 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); | 123 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); |
124 | new QLabel( i18n("New dirs are created automatically"), storePage ); | 124 | new QLabel( i18n("New dirs are created automatically"), storePage ); |
125 | QHBox *bb = new QHBox( storePage ); | 125 | QHBox *bb = new QHBox( storePage ); |
126 | QPushButton * pb; | 126 | QPushButton * pb; |
127 | if ( QApplication::desktop()->width() < 640 ) | 127 | if ( QApplication::desktop()->width() < 640 ) |
128 | pb = new QPushButton ( i18n("Save"), bb ); | 128 | pb = new QPushButton ( i18n("Save"), bb ); |
129 | else | 129 | else |
130 | pb = new QPushButton ( i18n("Save settings"), bb ); | 130 | pb = new QPushButton ( i18n("Save settings"), bb ); |
131 | connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) ); | 131 | connect(pb, SIGNAL( clicked() ), this, SLOT ( saveStoreSettings() ) ); |
132 | pb = new QPushButton ( i18n("Save standard"), bb ); | 132 | pb = new QPushButton ( i18n("Save standard"), bb ); |
133 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) ); | 133 | connect(pb, SIGNAL( clicked() ), this, SLOT ( setStandardStore() ) ); |
134 | new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); | 134 | new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); |
135 | new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); | 135 | new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); |
136 | tabWidget->addTab( storePage, i18n( "Data storage path" ) ); | 136 | tabWidget->addTab( storePage, i18n( "Data storage path" ) ); |
137 | } | 137 | } |
138 | void KDEPIMConfigWidget::setStandardStore() | 138 | void KDEPIMConfigWidget::setStandardStore() |
139 | { | 139 | { |
140 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 140 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
141 | saveStoreSettings(); | 141 | saveStoreSettings(); |
142 | } | 142 | } |
143 | void KDEPIMConfigWidget::saveStoreSettings() | 143 | void KDEPIMConfigWidget::saveStoreSettings() |
144 | { | 144 | { |
145 | if ( !mStoreUrl->url().isEmpty() ) { | 145 | if ( !mStoreUrl->url().isEmpty() ) { |
146 | KConfig cfg ( QDir::homeDirPath() + "/.microkdehome" ); | 146 | QString path = QDir::homeDirPath(); |
147 | QString url = mStoreUrl->url(); | ||
148 | #ifdef DESKTOP_VERSION | ||
149 | if ( url.startsWith( "LOCAL:" ) ) { | ||
150 | path = qApp->applicationDirPath () ; | ||
151 | } | ||
152 | #endif | ||
153 | KConfig cfg ( path + "/.microkdehome" ); | ||
147 | cfg.setGroup("Global"); | 154 | cfg.setGroup("Global"); |
148 | cfg.writeEntry( "MICROKDEHOME", mStoreUrl->url() ); | 155 | cfg.writeEntry( "MICROKDEHOME", url ); |
149 | qDebug("cfg.writeEntry( MICROKDEHOME, mStoreUrl->url() ); "); | 156 | qDebug("cfg.writeEntry( MICROKDEHOME, %s ", url.latin1()); |
150 | cfg.sync(); | 157 | cfg.sync(); |
151 | } else { | 158 | } else { |
152 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); | 159 | mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); |
153 | saveStoreSettings(); | 160 | saveStoreSettings(); |
154 | } | 161 | } |
155 | } | 162 | } |
156 | void KDEPIMConfigWidget::setupExternalAppTab() | 163 | void KDEPIMConfigWidget::setupExternalAppTab() |
157 | { | 164 | { |
158 | QWidget *externalAppsPage = new QWidget( this ); | 165 | QWidget *externalAppsPage = new QWidget( this ); |
159 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), | 166 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), |
160 | KDialog::spacingHintSmall() ); | 167 | KDialog::spacingHintSmall() ); |
161 | 168 | ||
162 | mExternalApps = new QComboBox( externalAppsPage ); | 169 | mExternalApps = new QComboBox( externalAppsPage ); |
163 | 170 | ||
164 | QMap<ExternalAppHandler::Types, QString>::Iterator it; | 171 | QMap<ExternalAppHandler::Types, QString>::Iterator it; |
165 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) | 172 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) |
166 | mExternalApps->insertItem( it.data(), it.key() ); | 173 | mExternalApps->insertItem( it.data(), it.key() ); |
167 | 174 | ||
168 | layout->addWidget( mExternalApps ); | 175 | layout->addWidget( mExternalApps ); |
169 | 176 | ||
170 | connect( mExternalApps, SIGNAL( activated( int ) ), | 177 | connect( mExternalApps, SIGNAL( activated( int ) ), |
171 | this, SLOT (externalapp_changed( int ) ) ); | 178 | this, SLOT (externalapp_changed( int ) ) ); |
172 | 179 | ||
173 | 180 | ||
174 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); | 181 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); |
175 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); | 182 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); |
176 | mExternalAppGroupBox->layout()->setMargin(5); | 183 | mExternalAppGroupBox->layout()->setMargin(5); |
177 | 184 | ||
178 | mClient = new QComboBox( mExternalAppGroupBox ); | 185 | mClient = new QComboBox( mExternalAppGroupBox ); |
179 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); | 186 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); |
180 | 187 | ||
181 | connect( mClient, SIGNAL( activated( int ) ), | 188 | connect( mClient, SIGNAL( activated( int ) ), |
182 | this, SLOT (client_changed( int ) ) ); | 189 | this, SLOT (client_changed( int ) ) ); |
183 | 190 | ||
184 | QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); | 191 | QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); |
185 | boxLayout->addWidget( lab, 1, 0 ); | 192 | boxLayout->addWidget( lab, 1, 0 ); |
186 | mChannel = new QLineEdit(mExternalAppGroupBox); | 193 | mChannel = new QLineEdit(mExternalAppGroupBox); |
187 | mChannel->setReadOnly(true); | 194 | mChannel->setReadOnly(true); |
188 | boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); | 195 | boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); |
189 | 196 | ||
190 | lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); | 197 | lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); |
191 | boxLayout->addWidget( lab, 3, 0 ); | 198 | boxLayout->addWidget( lab, 3, 0 ); |
192 | mMessage = new QLineEdit(mExternalAppGroupBox); | 199 | mMessage = new QLineEdit(mExternalAppGroupBox); |
193 | mMessage->setReadOnly(true); | 200 | mMessage->setReadOnly(true); |
194 | boxLayout->addWidget( mMessage , 4, 0); | 201 | boxLayout->addWidget( mMessage , 4, 0); |
195 | 202 | ||
196 | lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); | 203 | lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); |
197 | boxLayout->addWidget( lab, 3, 1 ); | 204 | boxLayout->addWidget( lab, 3, 1 ); |
198 | mParameters = new QLineEdit(mExternalAppGroupBox); | 205 | mParameters = new QLineEdit(mExternalAppGroupBox); |
199 | mParameters->setReadOnly(true); | 206 | mParameters->setReadOnly(true); |
200 | boxLayout->addWidget( mParameters, 4, 1 ); | 207 | boxLayout->addWidget( mParameters, 4, 1 ); |
201 | 208 | ||
202 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); | 209 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); |
203 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); | 210 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); |
204 | 211 | ||
205 | 212 | ||
206 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); | 213 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); |
207 | boxLayout->addWidget( lab, 6, 0 ); | 214 | boxLayout->addWidget( lab, 6, 0 ); |
208 | mMessage2 = new QLineEdit(mExternalAppGroupBox); | 215 | mMessage2 = new QLineEdit(mExternalAppGroupBox); |
209 | mMessage2->setReadOnly(true); | 216 | mMessage2->setReadOnly(true); |
210 | boxLayout->addWidget( mMessage2 , 7, 0); | 217 | boxLayout->addWidget( mMessage2 , 7, 0); |
211 | 218 | ||
212 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); | 219 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); |
213 | boxLayout->addWidget( lab, 6, 1 ); | 220 | boxLayout->addWidget( lab, 6, 1 ); |
214 | mParameters2 = new QLineEdit(mExternalAppGroupBox); | 221 | mParameters2 = new QLineEdit(mExternalAppGroupBox); |
215 | mParameters2->setReadOnly(true); | 222 | mParameters2->setReadOnly(true); |
216 | boxLayout->addWidget( mParameters2, 7, 1 ); | 223 | boxLayout->addWidget( mParameters2, 7, 1 ); |
217 | 224 | ||
218 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); | 225 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); |
219 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); | 226 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); |
220 | 227 | ||
221 | 228 | ||
222 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 229 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
223 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 230 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
224 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 231 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
225 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 232 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
226 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 233 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
227 | 234 | ||
228 | 235 | ||
229 | layout->addWidget( mExternalAppGroupBox ); | 236 | layout->addWidget( mExternalAppGroupBox ); |
230 | tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); | 237 | tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); |
231 | 238 | ||
232 | } | 239 | } |
233 | 240 | ||
234 | 241 | ||
235 | void KDEPIMConfigWidget::setupLocaleDateTab() | 242 | void KDEPIMConfigWidget::setupLocaleDateTab() |
236 | { | 243 | { |
237 | QWidget *topFrame = new QWidget( this ); | 244 | QWidget *topFrame = new QWidget( this ); |
238 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); | 245 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); |
239 | 246 | ||
240 | topLayout->setSpacing(KDialog::spacingHintSmall()); | 247 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
241 | topLayout->setMargin(KDialog::marginHintSmall()); | 248 | topLayout->setMargin(KDialog::marginHintSmall()); |
242 | int iii = 0; | 249 | int iii = 0; |
243 | 250 | ||
244 | 251 | ||
245 | KPrefsWidRadios *syncPrefsGroup = | 252 | KPrefsWidRadios *syncPrefsGroup = |
246 | addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); | 253 | addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); |
247 | QString format; | 254 | QString format; |
248 | if ( QApplication::desktop()->width() < 480 ) | 255 | if ( QApplication::desktop()->width() < 480 ) |
249 | format = "(%d.%m.%Y)"; | 256 | format = "(%d.%m.%Y)"; |
250 | else | 257 | else |
251 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 258 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
252 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 259 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
253 | if ( QApplication::desktop()->width() < 480 ) | 260 | if ( QApplication::desktop()->width() < 480 ) |
254 | format = "(%m.%d.%Y)"; | 261 | format = "(%m.%d.%Y)"; |
255 | else | 262 | else |
256 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 263 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
257 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 264 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
258 | if ( QApplication::desktop()->width() < 480 ) | 265 | if ( QApplication::desktop()->width() < 480 ) |
259 | format = "(%Y-%m-%d)"; | 266 | format = "(%Y-%m-%d)"; |
260 | else | 267 | else |
261 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 268 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
262 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 269 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
263 | syncPrefsGroup->addRadio(i18n("User defined")); | 270 | syncPrefsGroup->addRadio(i18n("User defined")); |
264 | if ( QApplication::desktop()->width() < 480 ) { | 271 | if ( QApplication::desktop()->width() < 480 ) { |
265 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); | 272 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); |
266 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); | 273 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); |
267 | } | 274 | } |
268 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 275 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
269 | ++iii; | 276 | ++iii; |
270 | ++iii; | 277 | ++iii; |
271 | QLabel * lab; | 278 | QLabel * lab; |
272 | mUserDateFormatLong = new QLineEdit(topFrame); | 279 | mUserDateFormatLong = new QLineEdit(topFrame); |
273 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 280 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
274 | topLayout->addWidget(lab ,iii,0); | 281 | topLayout->addWidget(lab ,iii,0); |
275 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 282 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
276 | ++iii; | 283 | ++iii; |
277 | mUserDateFormatShort = new QLineEdit(topFrame); | 284 | mUserDateFormatShort = new QLineEdit(topFrame); |