Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/koprefsdialog.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 13d6681..5c8a5a9 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp | |||
@@ -1,341 +1,344 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
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 | #include <kdialog.h> | 23 | #include <kdialog.h> |
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qgroupbox.h> | 26 | #include <qgroupbox.h> |
27 | #include <qbuttongroup.h> | 27 | #include <qbuttongroup.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qfont.h> | 29 | #include <qfont.h> |
30 | #include <qslider.h> | 30 | #include <qslider.h> |
31 | #include <qfile.h> | 31 | #include <qfile.h> |
32 | #include <qtextstream.h> | 32 | #include <qtextstream.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qvbox.h> | 34 | #include <qvbox.h> |
35 | #include <qhbox.h> | 35 | #include <qhbox.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
38 | #include <qdatetime.h> | 38 | #include <qdatetime.h> |
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | #include <qradiobutton.h> | 40 | #include <qradiobutton.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qstrlist.h> | 42 | #include <qstrlist.h> |
43 | #include <qapplication.h> | 43 | #include <qapplication.h> |
44 | 44 | ||
45 | #include <kcolorbutton.h> | 45 | #include <kcolorbutton.h> |
46 | #include <kdebug.h> | 46 | #include <kdebug.h> |
47 | #include <klocale.h> | 47 | #include <klocale.h> |
48 | #include <kglobal.h> | 48 | #include <kglobal.h> |
49 | #include <kfontdialog.h> | 49 | #include <kfontdialog.h> |
50 | #include <kfiledialog.h> | 50 | #include <kfiledialog.h> |
51 | #include <kmessagebox.h> | 51 | #include <kmessagebox.h> |
52 | #include <kcolordialog.h> | 52 | #include <kcolordialog.h> |
53 | #include <kiconloader.h> | 53 | #include <kiconloader.h> |
54 | #include <kemailsettings.h> | 54 | #include <kemailsettings.h> |
55 | #include <kstandarddirs.h> | 55 | #include <kstandarddirs.h> |
56 | 56 | ||
57 | #include <klineedit.h> | 57 | #include <klineedit.h> |
58 | 58 | ||
59 | 59 | ||
60 | #include "koprefs.h" | 60 | #include "koprefs.h" |
61 | 61 | ||
62 | #include "koprefsdialog.h" | 62 | #include "koprefsdialog.h" |
63 | //#include <kprefswidget.h> | 63 | //#include <kprefswidget.h> |
64 | 64 | ||
65 | 65 | ||
66 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 66 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
67 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 67 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
68 | { | 68 | { |
69 | 69 | ||
70 | setCaption( i18n("Settings - some need a restart (nr)")); | 70 | setCaption( i18n("Settings - some need a restart (nr)")); |
71 | setupGlobalTab(); | 71 | setupGlobalTab(); |
72 | setupMainTab(); | 72 | setupMainTab(); |
73 | setupMailTab();; | 73 | setupMailTab();; |
74 | setupFontsTab(); | 74 | setupFontsTab(); |
75 | readConfig(); | 75 | readConfig(); |
76 | 76 | ||
77 | #if 0 | 77 | #if 0 |
78 | 78 | ||
79 | setupMainTab(); | 79 | setupMainTab(); |
80 | setupLocaleTab(); | 80 | setupLocaleTab(); |
81 | setupTimeZoneTab(); | 81 | setupTimeZoneTab(); |
82 | setupTimeTab(); | 82 | setupTimeTab(); |
83 | setupLocaleDateTab(); | 83 | setupLocaleDateTab(); |
84 | setupFontsTab(); | 84 | setupFontsTab(); |
85 | setupColorsTab(); | 85 | setupColorsTab(); |
86 | setupViewsTab(); | 86 | setupViewsTab(); |
87 | //setupSyncTab(); | 87 | //setupSyncTab(); |
88 | //setupSyncAlgTab(); | 88 | //setupSyncAlgTab(); |
89 | //setupPrinterTab(); | 89 | //setupPrinterTab(); |
90 | //setupGroupSchedulingTab(); | 90 | //setupGroupSchedulingTab(); |
91 | //setupGroupAutomationTab(); | 91 | //setupGroupAutomationTab(); |
92 | #endif | 92 | #endif |
93 | } | 93 | } |
94 | 94 | ||
95 | #include "kpimglobalprefs.h" | 95 | #include "kpimglobalprefs.h" |
96 | 96 | ||
97 | KOPrefsDialog::~KOPrefsDialog() | 97 | KOPrefsDialog::~KOPrefsDialog() |
98 | { | 98 | { |
99 | } | 99 | } |
100 | void KOPrefsDialog::setupGlobalTab() | 100 | void KOPrefsDialog::setupGlobalTab() |
101 | { | 101 | { |
102 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 102 | QFrame *topFrame = addPage(i18n("Global"),0,0); |
103 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 103 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); |
104 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 104 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); |
105 | topLayout->addWidget( kdelibcfg ); | 105 | topLayout->addWidget( kdelibcfg ); |
106 | 106 | ||
107 | 107 | ||
108 | } | 108 | } |
109 | void KOPrefsDialog::setupMainTab() | 109 | void KOPrefsDialog::setupMainTab() |
110 | { | 110 | { |
111 | QFrame *topFrame = addPage(i18n("General"),0,0); | 111 | QFrame *topFrame = addPage(i18n("General"),0,0); |
112 | 112 | ||
113 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 113 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
114 | topLayout->setSpacing(spacingHint()); | 114 | topLayout->setSpacing(spacingHint()); |
115 | topLayout->setMargin(marginHint()); | 115 | topLayout->setMargin(marginHint()); |
116 | 116 | ||
117 | 117 | ||
118 | mNameEdit = new QLineEdit(topFrame); | 118 | mNameEdit = new QLineEdit(topFrame); |
119 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 119 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
120 | topLayout->addWidget(mNameLabel,0,0); | 120 | topLayout->addWidget(mNameLabel,0,0); |
121 | topLayout->addWidget(mNameEdit,0,1); | 121 | topLayout->addWidget(mNameEdit,0,1); |
122 | 122 | ||
123 | mEmailEdit = new QLineEdit(topFrame); | 123 | mEmailEdit = new QLineEdit(topFrame); |
124 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 124 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
125 | topLayout->addWidget(mEmailLabel,1,0); | 125 | topLayout->addWidget(mEmailLabel,1,0); |
126 | topLayout->addWidget(mEmailEdit,1,1); | 126 | topLayout->addWidget(mEmailEdit,1,1); |
127 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); | 127 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); |
128 | topLayout->addMultiCellWidget(lab,2,2,0,1); | 128 | topLayout->addMultiCellWidget(lab,2,2,0,1); |
129 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), | 129 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), |
130 | &(KOPrefs::instance()->mUseKapi),topFrame); | 130 | &(KOPrefs::instance()->mUseKapi),topFrame); |
131 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); | 131 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); |
132 | } | 132 | } |
133 | 133 | ||
134 | void KOPrefsDialog::setupMailTab() | 134 | void KOPrefsDialog::setupMailTab() |
135 | { | 135 | { |
136 | QFrame *topFrame = addPage(i18n("Mail"),0,0); | 136 | QFrame *topFrame = addPage(i18n("Mail"),0,0); |
137 | 137 | ||
138 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 138 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
139 | topLayout->setSpacing(spacingHint()); | 139 | topLayout->setSpacing(spacingHint()); |
140 | topLayout->setMargin(marginHint()); | 140 | topLayout->setMargin(marginHint()); |
141 | 141 | ||
142 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), | 142 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), |
143 | &(KOPrefs::instance()->mViewAsHtml),topFrame); | 143 | &(KOPrefs::instance()->mViewAsHtml),topFrame); |
144 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); | 144 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); |
145 | 145 | ||
146 | 146 | ||
147 | ttt = addWidBool(i18n("Send mails later"), | 147 | ttt = addWidBool(i18n("Send mails later"), |
148 | &(KOPrefs::instance()->mSendLater),topFrame); | 148 | &(KOPrefs::instance()->mSendLater),topFrame); |
149 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); | 149 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); |
150 | ttt = addWidBool(i18n("Show \"To\" field in list view"), | ||
151 | &(KOPrefs::instance()->mShowToField),topFrame); | ||
152 | topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); | ||
150 | /* | 153 | /* |
151 | mCodecEdit = new QLineEdit(topFrame); | 154 | mCodecEdit = new QLineEdit(topFrame); |
152 | topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); | 155 | topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); |
153 | topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); | 156 | topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); |
154 | topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); | 157 | topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); |
155 | */ | 158 | */ |
156 | } | 159 | } |
157 | void KOPrefsDialog::setupFontsTab() | 160 | void KOPrefsDialog::setupFontsTab() |
158 | { | 161 | { |
159 | 162 | ||
160 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 163 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); |
161 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 164 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
162 | 165 | ||
163 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 166 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); |
164 | topLayout->setSpacing(1); | 167 | topLayout->setSpacing(1); |
165 | topLayout->setMargin(3); | 168 | topLayout->setMargin(3); |
166 | KPrefsDialogWidFont * tVFont; | 169 | KPrefsDialogWidFont * tVFont; |
167 | int i = 0; | 170 | int i = 0; |
168 | KPrefsDialogWidFont *timeLabelsFont = | 171 | KPrefsDialogWidFont *timeLabelsFont = |
169 | addWidFont(i18n("OK"),i18n("Application(nr)"), | 172 | addWidFont(i18n("OK"),i18n("Application(nr)"), |
170 | &(KOPrefs::instance()->mAppFont),topFrame); | 173 | &(KOPrefs::instance()->mAppFont),topFrame); |
171 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 174 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
172 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 175 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
173 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 176 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
174 | ++i; | 177 | ++i; |
175 | 178 | ||
176 | 179 | ||
177 | timeLabelsFont = | 180 | timeLabelsFont = |
178 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), | 181 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), |
179 | &(KOPrefs::instance()->mComposeFont),topFrame); | 182 | &(KOPrefs::instance()->mComposeFont),topFrame); |
180 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 183 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
181 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 184 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
182 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 185 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
183 | ++i; | 186 | ++i; |
184 | 187 | ||
185 | KPrefsDialogWidFont *timeBarFont = | 188 | KPrefsDialogWidFont *timeBarFont = |
186 | addWidFont(i18n("Hello"),i18n("Read mail:"), | 189 | addWidFont(i18n("Hello"),i18n("Read mail:"), |
187 | &(KOPrefs::instance()->mReadFont),topFrame); | 190 | &(KOPrefs::instance()->mReadFont),topFrame); |
188 | topLayout->addWidget(timeBarFont->label(),i,0); | 191 | topLayout->addWidget(timeBarFont->label(),i,0); |
189 | topLayout->addWidget(timeBarFont->preview(),i,1); | 192 | topLayout->addWidget(timeBarFont->preview(),i,1); |
190 | topLayout->addWidget(timeBarFont->button(),i,2); | 193 | topLayout->addWidget(timeBarFont->button(),i,2); |
191 | ++i; | 194 | ++i; |
192 | 195 | ||
193 | topLayout->setColStretch(1,1); | 196 | topLayout->setColStretch(1,1); |
194 | topLayout->setRowStretch(4,1); | 197 | topLayout->setRowStretch(4,1); |
195 | 198 | ||
196 | } | 199 | } |
197 | void KOPrefsDialog::usrReadConfig() | 200 | void KOPrefsDialog::usrReadConfig() |
198 | { | 201 | { |
199 | 202 | ||
200 | mNameEdit->setText(KOPrefs::instance()->mName); | 203 | mNameEdit->setText(KOPrefs::instance()->mName); |
201 | mEmailEdit->setText(KOPrefs::instance()->mEmail); | 204 | mEmailEdit->setText(KOPrefs::instance()->mEmail); |
202 | //mCodecEdit->setText(KOPrefs::instance()->mSendCodec); | 205 | //mCodecEdit->setText(KOPrefs::instance()->mSendCodec); |
203 | kdelibcfg->readConfig(); | 206 | kdelibcfg->readConfig(); |
204 | } | 207 | } |
205 | void KOPrefsDialog::usrWriteConfig() | 208 | void KOPrefsDialog::usrWriteConfig() |
206 | { | 209 | { |
207 | KOPrefs::instance()->mName = mNameEdit->text(); | 210 | KOPrefs::instance()->mName = mNameEdit->text(); |
208 | KOPrefs::instance()->mEmail = mEmailEdit->text(); | 211 | KOPrefs::instance()->mEmail = mEmailEdit->text(); |
209 | //KOPrefs::instance()->mSendCodec = mCodecEdit->text(); | 212 | //KOPrefs::instance()->mSendCodec = mCodecEdit->text(); |
210 | kdelibcfg->writeConfig(); | 213 | kdelibcfg->writeConfig(); |
211 | 214 | ||
212 | 215 | ||
213 | } | 216 | } |
214 | 217 | ||
215 | #if 0 | 218 | #if 0 |
216 | void KOPrefsDialog::setupLocaleDateTab() | 219 | void KOPrefsDialog::setupLocaleDateTab() |
217 | { | 220 | { |
218 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 221 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
219 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 222 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
220 | topLayout->setSpacing(spacingHint()); | 223 | topLayout->setSpacing(spacingHint()); |
221 | topLayout->setMargin(marginHint()); | 224 | topLayout->setMargin(marginHint()); |
222 | int iii = 0; | 225 | int iii = 0; |
223 | 226 | ||
224 | 227 | ||
225 | KPrefsWidRadios *syncPrefsGroup = | 228 | KPrefsWidRadios *syncPrefsGroup = |
226 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 229 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
227 | QString format; | 230 | QString format; |
228 | if ( QApplication::desktop()->width() < 480 ) | 231 | if ( QApplication::desktop()->width() < 480 ) |
229 | format = "(%d.%m.%Y)"; | 232 | format = "(%d.%m.%Y)"; |
230 | else | 233 | else |
231 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 234 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
232 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 235 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
233 | if ( QApplication::desktop()->width() < 480 ) | 236 | if ( QApplication::desktop()->width() < 480 ) |
234 | format = "(%m.%d.%Y)"; | 237 | format = "(%m.%d.%Y)"; |
235 | else | 238 | else |
236 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 239 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
237 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 240 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
238 | if ( QApplication::desktop()->width() < 480 ) | 241 | if ( QApplication::desktop()->width() < 480 ) |
239 | format = "(%Y-%m-%d)"; | 242 | format = "(%Y-%m-%d)"; |
240 | else | 243 | else |
241 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 244 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
242 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 245 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
243 | syncPrefsGroup->addRadio(i18n("User defined")); | 246 | syncPrefsGroup->addRadio(i18n("User defined")); |
244 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 247 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
245 | ++iii; | 248 | ++iii; |
246 | ++iii; | 249 | ++iii; |
247 | QLabel * lab; | 250 | QLabel * lab; |
248 | mUserDateFormatLong = new QLineEdit(topFrame); | 251 | mUserDateFormatLong = new QLineEdit(topFrame); |
249 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 252 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
250 | topLayout->addWidget(lab ,iii,0); | 253 | topLayout->addWidget(lab ,iii,0); |
251 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 254 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
252 | ++iii; | 255 | ++iii; |
253 | mUserDateFormatShort = new QLineEdit(topFrame); | 256 | mUserDateFormatShort = new QLineEdit(topFrame); |
254 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 257 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
255 | topLayout->addWidget(lab ,iii,0); | 258 | topLayout->addWidget(lab ,iii,0); |
256 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 259 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
257 | ++iii; | 260 | ++iii; |
258 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 261 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
259 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 262 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
260 | ++iii; | 263 | ++iii; |
261 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 264 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
262 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 265 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
263 | ++iii; | 266 | ++iii; |
264 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 267 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
265 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 268 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
266 | ++iii; | 269 | ++iii; |
267 | 270 | ||
268 | } | 271 | } |
269 | 272 | ||
270 | void KOPrefsDialog::setupLocaleTab() | 273 | void KOPrefsDialog::setupLocaleTab() |
271 | { | 274 | { |
272 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 275 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
273 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 276 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
274 | topLayout->setSpacing(spacingHint()); | 277 | topLayout->setSpacing(spacingHint()); |
275 | topLayout->setMargin(marginHint()); | 278 | topLayout->setMargin(marginHint()); |
276 | int iii = 0; | 279 | int iii = 0; |
277 | KPrefsWidRadios *syncPrefsGroup = | 280 | KPrefsWidRadios *syncPrefsGroup = |
278 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 281 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
279 | syncPrefsGroup->addRadio(i18n("English")); | 282 | syncPrefsGroup->addRadio(i18n("English")); |
280 | syncPrefsGroup->addRadio(i18n("German")); | 283 | syncPrefsGroup->addRadio(i18n("German")); |
281 | syncPrefsGroup->addRadio(i18n("French")); | 284 | syncPrefsGroup->addRadio(i18n("French")); |
282 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 285 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
283 | if ( QApplication::desktop()->width() < 300 ) | 286 | if ( QApplication::desktop()->width() < 300 ) |
284 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 287 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
285 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 288 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
286 | ++iii; | 289 | ++iii; |
287 | 290 | ||
288 | syncPrefsGroup = | 291 | syncPrefsGroup = |
289 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 292 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
290 | if ( QApplication::desktop()->width() > 300 ) | 293 | if ( QApplication::desktop()->width() > 300 ) |
291 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 294 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
292 | syncPrefsGroup->addRadio(i18n("24:00")); | 295 | syncPrefsGroup->addRadio(i18n("24:00")); |
293 | syncPrefsGroup->addRadio(i18n("12:00am")); | 296 | syncPrefsGroup->addRadio(i18n("12:00am")); |
294 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 297 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
295 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 298 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
296 | ++iii; | 299 | ++iii; |
297 | KPrefsDialogWidBool *sb; | 300 | KPrefsDialogWidBool *sb; |
298 | if ( QApplication::desktop()->width() < 300 ) { | 301 | if ( QApplication::desktop()->width() < 300 ) { |
299 | sb = | 302 | sb = |
300 | addWidBool(i18n("Week starts on Sunday"), | 303 | addWidBool(i18n("Week starts on Sunday"), |
301 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 304 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
302 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 305 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
303 | ++iii; | 306 | ++iii; |
304 | sb = | 307 | sb = |
305 | addWidBool(i18n("Use short date in (WN/E) view"), | 308 | addWidBool(i18n("Use short date in (WN/E) view"), |
306 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 309 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
307 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 310 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
308 | } | 311 | } |
309 | else { | 312 | else { |
310 | QWidget * hb = new QWidget( topFrame ); | 313 | QWidget * hb = new QWidget( topFrame ); |
311 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 314 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); |
312 | sb = | 315 | sb = |
313 | addWidBool(i18n("Week starts on Sunday"), | 316 | addWidBool(i18n("Week starts on Sunday"), |
314 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 317 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
315 | hbLayout->addWidget(sb->checkBox() ); | 318 | hbLayout->addWidget(sb->checkBox() ); |
316 | sb = | 319 | sb = |
317 | addWidBool(i18n("Use short date in (WN/E) view"), | 320 | addWidBool(i18n("Use short date in (WN/E) view"), |
318 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 321 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
319 | hbLayout->addWidget(sb->checkBox() ); | 322 | hbLayout->addWidget(sb->checkBox() ); |
320 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 323 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
321 | 324 | ||
322 | } | 325 | } |
323 | //#ifndef DESKTOP_VERSION | 326 | //#ifndef DESKTOP_VERSION |
324 | #if 0 | 327 | #if 0 |
325 | ++iii; | 328 | ++iii; |
326 | sb = | 329 | sb = |
327 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 330 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
328 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 331 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
329 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 332 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
330 | #endif | 333 | #endif |
331 | } | 334 | } |
332 | void KOPrefsDialog::showSyncPage() | 335 | void KOPrefsDialog::showSyncPage() |
333 | { | 336 | { |
334 | showPage ( 2 ) ; | 337 | showPage ( 2 ) ; |
335 | 338 | ||
336 | } | 339 | } |
337 | void KOPrefsDialog::setupSyncAlgTab() | 340 | void KOPrefsDialog::setupSyncAlgTab() |
338 | { | 341 | { |
339 | #if 0 | 342 | #if 0 |
340 | QLabel * lab; | 343 | QLabel * lab; |
341 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); | 344 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); |