summaryrefslogtreecommitdiffabout
path: root/kmicromail/koprefsdialog.cpp
Unidiff
Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/koprefsdialog.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 4af4a8c..40347cc 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -1,843 +1,847 @@
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
66KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 66KOPrefsDialog::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#ifndef DESKTOP_VERSION
77 if ( QApplication::desktop()->height() == 480 )
78 hideButtons();
79#endif
76 80
77#if 0 81#if 0
78 82
79 setupMainTab(); 83 setupMainTab();
80 setupLocaleTab(); 84 setupLocaleTab();
81 setupTimeZoneTab(); 85 setupTimeZoneTab();
82 setupTimeTab(); 86 setupTimeTab();
83 setupLocaleDateTab(); 87 setupLocaleDateTab();
84 setupFontsTab(); 88 setupFontsTab();
85 setupColorsTab(); 89 setupColorsTab();
86 setupViewsTab(); 90 setupViewsTab();
87 //setupSyncTab(); 91 //setupSyncTab();
88 //setupSyncAlgTab(); 92 //setupSyncAlgTab();
89 //setupPrinterTab(); 93 //setupPrinterTab();
90 //setupGroupSchedulingTab(); 94 //setupGroupSchedulingTab();
91 //setupGroupAutomationTab(); 95 //setupGroupAutomationTab();
92#endif 96#endif
93} 97}
94 98
95#include "kpimglobalprefs.h" 99#include "kpimglobalprefs.h"
96 100
97KOPrefsDialog::~KOPrefsDialog() 101KOPrefsDialog::~KOPrefsDialog()
98{ 102{
99} 103}
100void KOPrefsDialog::setupGlobalTab() 104void KOPrefsDialog::setupGlobalTab()
101{ 105{
102 QFrame *topFrame = addPage(i18n("Global"),0,0); 106 QFrame *topFrame = addPage(i18n("Global"),0,0);
103 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); 107 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
104 QVBoxLayout *topLayout = new QVBoxLayout(topFrame); 108 QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
105 topLayout->addWidget( kdelibcfg ); 109 topLayout->addWidget( kdelibcfg );
106 110
107 111
108} 112}
109void KOPrefsDialog::setupMainTab() 113void KOPrefsDialog::setupMainTab()
110{ 114{
111 QFrame *topFrame = addPage(i18n("General"),0,0); 115 QFrame *topFrame = addPage(i18n("General"),0,0);
112 116
113 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 117 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
114 topLayout->setSpacing(spacingHint()); 118 topLayout->setSpacing(spacingHint());
115 topLayout->setMargin(marginHint()); 119 topLayout->setMargin(marginHint());
116 120
117 121
118 mNameEdit = new QLineEdit(topFrame); 122 mNameEdit = new QLineEdit(topFrame);
119 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 123 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
120 topLayout->addWidget(mNameLabel,0,0); 124 topLayout->addWidget(mNameLabel,0,0);
121 topLayout->addWidget(mNameEdit,0,1); 125 topLayout->addWidget(mNameEdit,0,1);
122 126
123 mEmailEdit = new QLineEdit(topFrame); 127 mEmailEdit = new QLineEdit(topFrame);
124 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 128 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
125 topLayout->addWidget(mEmailLabel,1,0); 129 topLayout->addWidget(mEmailLabel,1,0);
126 topLayout->addWidget(mEmailEdit,1,1); 130 topLayout->addWidget(mEmailEdit,1,1);
127 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); 131 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame);
128 topLayout->addMultiCellWidget(lab,2,2,0,1); 132 topLayout->addMultiCellWidget(lab,2,2,0,1);
129 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), 133 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"),
130 &(KOPrefs::instance()->mUseKapi),topFrame); 134 &(KOPrefs::instance()->mUseKapi),topFrame);
131 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); 135 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1);
132} 136}
133 137
134void KOPrefsDialog::setupMailTab() 138void KOPrefsDialog::setupMailTab()
135{ 139{
136 QFrame *topFrame = addPage(i18n("Mail"),0,0); 140 QFrame *topFrame = addPage(i18n("Mail"),0,0);
137 141
138 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 142 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
139 topLayout->setSpacing(spacingHint()); 143 topLayout->setSpacing(spacingHint());
140 topLayout->setMargin(marginHint()); 144 topLayout->setMargin(marginHint());
141 145
142 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), 146 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"),
143 &(KOPrefs::instance()->mViewAsHtml),topFrame); 147 &(KOPrefs::instance()->mViewAsHtml),topFrame);
144 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); 148 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1);
145 149
146 150
147 ttt = addWidBool(i18n("Send mails later"), 151 ttt = addWidBool(i18n("Send mails later"),
148 &(KOPrefs::instance()->mSendLater),topFrame); 152 &(KOPrefs::instance()->mSendLater),topFrame);
149 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); 153 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1);
150 ttt = addWidBool(i18n("Show \"To\" field in list view"), 154 ttt = addWidBool(i18n("Show \"To\" field in list view"),
151 &(KOPrefs::instance()->mShowToField),topFrame); 155 &(KOPrefs::instance()->mShowToField),topFrame);
152 topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); 156 topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1);
153 157
154 int iii =3; 158 int iii =3;
155 ttt = addWidBool(i18n("Show info fields at startup"), 159 ttt = addWidBool(i18n("Show info fields at startup"),
156 &(KOPrefs::instance()->mShowInfoStart),topFrame); 160 &(KOPrefs::instance()->mShowInfoStart),topFrame);
157 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 161 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
158 ++iii; 162 ++iii;
159 ttt = addWidBool(i18n("Show \"Subject\" info field"), 163 ttt = addWidBool(i18n("Show \"Subject\" info field"),
160 &(KOPrefs::instance()->mShowInfoSub),topFrame); 164 &(KOPrefs::instance()->mShowInfoSub),topFrame);
161 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 165 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
162 ++iii; 166 ++iii;
163 ttt = addWidBool(i18n("Show \"From\" info field"), 167 ttt = addWidBool(i18n("Show \"From\" info field"),
164 &(KOPrefs::instance()->mShowInfoFrom),topFrame); 168 &(KOPrefs::instance()->mShowInfoFrom),topFrame);
165 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 169 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
166 ++iii; 170 ++iii;
167 ttt = addWidBool(i18n("Show \"To\" info field"), 171 ttt = addWidBool(i18n("Show \"To\" info field"),
168 &(KOPrefs::instance()->mShowInfoTo),topFrame); 172 &(KOPrefs::instance()->mShowInfoTo),topFrame);
169 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 173 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
170 ++iii; 174 ++iii;
171 175
172 /* 176 /*
173 mCodecEdit = new QLineEdit(topFrame); 177 mCodecEdit = new QLineEdit(topFrame);
174 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); 178 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1);
175 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); 179 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1);
176 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); 180 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1);
177 */ 181 */
178} 182}
179void KOPrefsDialog::setupFontsTab() 183void KOPrefsDialog::setupFontsTab()
180{ 184{
181 185
182 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 186 QFrame *topFrame = addPage(i18n("Fonts"),0,0);
183 // DesktopIcon("fonts",KIcon::SizeMedium)); 187 // DesktopIcon("fonts",KIcon::SizeMedium));
184 188
185 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 189 QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
186 topLayout->setSpacing(1); 190 topLayout->setSpacing(1);
187 topLayout->setMargin(3); 191 topLayout->setMargin(3);
188 KPrefsDialogWidFont * tVFont; 192 KPrefsDialogWidFont * tVFont;
189 int i = 0; 193 int i = 0;
190 KPrefsDialogWidFont *timeLabelsFont = 194 KPrefsDialogWidFont *timeLabelsFont =
191 addWidFont(i18n("OK"),i18n("Application(nr)"), 195 addWidFont(i18n("OK"),i18n("Application(nr)"),
192 &(KOPrefs::instance()->mAppFont),topFrame); 196 &(KOPrefs::instance()->mAppFont),topFrame);
193 topLayout->addWidget(timeLabelsFont->label(),i,0); 197 topLayout->addWidget(timeLabelsFont->label(),i,0);
194 topLayout->addWidget(timeLabelsFont->preview(),i,1); 198 topLayout->addWidget(timeLabelsFont->preview(),i,1);
195 topLayout->addWidget(timeLabelsFont->button(),i,2); 199 topLayout->addWidget(timeLabelsFont->button(),i,2);
196 ++i; 200 ++i;
197 201
198 202
199 timeLabelsFont = 203 timeLabelsFont =
200 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), 204 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"),
201 &(KOPrefs::instance()->mComposeFont),topFrame); 205 &(KOPrefs::instance()->mComposeFont),topFrame);
202 topLayout->addWidget(timeLabelsFont->label(),i,0); 206 topLayout->addWidget(timeLabelsFont->label(),i,0);
203 topLayout->addWidget(timeLabelsFont->preview(),i,1); 207 topLayout->addWidget(timeLabelsFont->preview(),i,1);
204 topLayout->addWidget(timeLabelsFont->button(),i,2); 208 topLayout->addWidget(timeLabelsFont->button(),i,2);
205 ++i; 209 ++i;
206 210
207 KPrefsDialogWidFont *timeBarFont = 211 KPrefsDialogWidFont *timeBarFont =
208 addWidFont(i18n("Hello"),i18n("Read mail:"), 212 addWidFont(i18n("Hello"),i18n("Read mail:"),
209 &(KOPrefs::instance()->mReadFont),topFrame); 213 &(KOPrefs::instance()->mReadFont),topFrame);
210 topLayout->addWidget(timeBarFont->label(),i,0); 214 topLayout->addWidget(timeBarFont->label(),i,0);
211 topLayout->addWidget(timeBarFont->preview(),i,1); 215 topLayout->addWidget(timeBarFont->preview(),i,1);
212 topLayout->addWidget(timeBarFont->button(),i,2); 216 topLayout->addWidget(timeBarFont->button(),i,2);
213 ++i; 217 ++i;
214 218
215 topLayout->setColStretch(1,1); 219 topLayout->setColStretch(1,1);
216 topLayout->setRowStretch(4,1); 220 topLayout->setRowStretch(4,1);
217 221
218} 222}
219void KOPrefsDialog::usrReadConfig() 223void KOPrefsDialog::usrReadConfig()
220{ 224{
221 225
222 mNameEdit->setText(KOPrefs::instance()->mName); 226 mNameEdit->setText(KOPrefs::instance()->mName);
223 mEmailEdit->setText(KOPrefs::instance()->mEmail); 227 mEmailEdit->setText(KOPrefs::instance()->mEmail);
224 //mCodecEdit->setText(KOPrefs::instance()->mSendCodec); 228 //mCodecEdit->setText(KOPrefs::instance()->mSendCodec);
225 kdelibcfg->readConfig(); 229 kdelibcfg->readConfig();
226} 230}
227void KOPrefsDialog::usrWriteConfig() 231void KOPrefsDialog::usrWriteConfig()
228{ 232{
229 KOPrefs::instance()->mName = mNameEdit->text(); 233 KOPrefs::instance()->mName = mNameEdit->text();
230 KOPrefs::instance()->mEmail = mEmailEdit->text(); 234 KOPrefs::instance()->mEmail = mEmailEdit->text();
231 //KOPrefs::instance()->mSendCodec = mCodecEdit->text(); 235 //KOPrefs::instance()->mSendCodec = mCodecEdit->text();
232 kdelibcfg->writeConfig(); 236 kdelibcfg->writeConfig();
233 237
234 238
235} 239}
236 240
237#if 0 241#if 0
238void KOPrefsDialog::setupLocaleDateTab() 242void KOPrefsDialog::setupLocaleDateTab()
239{ 243{
240QFrame *topFrame = addPage(i18n("Date Format"),0,0); 244QFrame *topFrame = addPage(i18n("Date Format"),0,0);
241 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 245 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
242 topLayout->setSpacing(spacingHint()); 246 topLayout->setSpacing(spacingHint());
243 topLayout->setMargin(marginHint()); 247 topLayout->setMargin(marginHint());
244 int iii = 0; 248 int iii = 0;
245 249
246 250
247 KPrefsWidRadios *syncPrefsGroup = 251 KPrefsWidRadios *syncPrefsGroup =
248 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 252 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
249 QString format; 253 QString format;
250 if ( QApplication::desktop()->width() < 480 ) 254 if ( QApplication::desktop()->width() < 480 )
251 format = "(%d.%m.%Y)"; 255 format = "(%d.%m.%Y)";
252 else 256 else
253 format = "(%d.%m.%Y|%A %d %B %Y)"; 257 format = "(%d.%m.%Y|%A %d %B %Y)";
254 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 258 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
255 if ( QApplication::desktop()->width() < 480 ) 259 if ( QApplication::desktop()->width() < 480 )
256 format = "(%m.%d.%Y)"; 260 format = "(%m.%d.%Y)";
257 else 261 else
258 format = "(%m.%d.%Y|%A %B %d %Y)"; 262 format = "(%m.%d.%Y|%A %B %d %Y)";
259 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 263 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
260 if ( QApplication::desktop()->width() < 480 ) 264 if ( QApplication::desktop()->width() < 480 )
261 format = "(%Y-%m-%d)"; 265 format = "(%Y-%m-%d)";
262 else 266 else
263 format = "(%Y-%m-%d|%A %Y %B %d)"; 267 format = "(%Y-%m-%d|%A %Y %B %d)";
264 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 268 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
265 syncPrefsGroup->addRadio(i18n("User defined")); 269 syncPrefsGroup->addRadio(i18n("User defined"));
266 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 270 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
267 ++iii; 271 ++iii;
268 ++iii; 272 ++iii;
269 QLabel * lab; 273 QLabel * lab;
270 mUserDateFormatLong = new QLineEdit(topFrame); 274 mUserDateFormatLong = new QLineEdit(topFrame);
271 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 275 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
272 topLayout->addWidget(lab ,iii,0); 276 topLayout->addWidget(lab ,iii,0);
273 topLayout->addWidget(mUserDateFormatLong,iii,1); 277 topLayout->addWidget(mUserDateFormatLong,iii,1);
274 ++iii; 278 ++iii;
275 mUserDateFormatShort = new QLineEdit(topFrame); 279 mUserDateFormatShort = new QLineEdit(topFrame);
276 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 280 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
277 topLayout->addWidget(lab ,iii,0); 281 topLayout->addWidget(lab ,iii,0);
278 topLayout->addWidget(mUserDateFormatShort,iii,1); 282 topLayout->addWidget(mUserDateFormatShort,iii,1);
279 ++iii; 283 ++iii;
280 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 284 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
281 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 285 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
282 ++iii; 286 ++iii;
283 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 287 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
284 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 288 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
285 ++iii; 289 ++iii;
286 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 290 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
287 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 291 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
288 ++iii; 292 ++iii;
289 293
290} 294}
291 295
292void KOPrefsDialog::setupLocaleTab() 296void KOPrefsDialog::setupLocaleTab()
293{ 297{
294 QFrame *topFrame = addPage(i18n("Locale"),0,0); 298 QFrame *topFrame = addPage(i18n("Locale"),0,0);
295 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 299 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
296 topLayout->setSpacing(spacingHint()); 300 topLayout->setSpacing(spacingHint());
297 topLayout->setMargin(marginHint()); 301 topLayout->setMargin(marginHint());
298 int iii = 0; 302 int iii = 0;
299 KPrefsWidRadios *syncPrefsGroup = 303 KPrefsWidRadios *syncPrefsGroup =
300 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); 304 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame);
301 syncPrefsGroup->addRadio(i18n("English")); 305 syncPrefsGroup->addRadio(i18n("English"));
302 syncPrefsGroup->addRadio(i18n("German")); 306 syncPrefsGroup->addRadio(i18n("German"));
303 syncPrefsGroup->addRadio(i18n("French")); 307 syncPrefsGroup->addRadio(i18n("French"));
304 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 308 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
305 if ( QApplication::desktop()->width() < 300 ) 309 if ( QApplication::desktop()->width() < 300 )
306 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 310 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
307 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 311 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
308 ++iii; 312 ++iii;
309 313
310 syncPrefsGroup = 314 syncPrefsGroup =
311 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); 315 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame);
312 if ( QApplication::desktop()->width() > 300 ) 316 if ( QApplication::desktop()->width() > 300 )
313 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 317 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
314 syncPrefsGroup->addRadio(i18n("24:00")); 318 syncPrefsGroup->addRadio(i18n("24:00"));
315 syncPrefsGroup->addRadio(i18n("12:00am")); 319 syncPrefsGroup->addRadio(i18n("12:00am"));
316 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 320 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
317 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 321 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
318 ++iii; 322 ++iii;
319 KPrefsDialogWidBool *sb; 323 KPrefsDialogWidBool *sb;
320 if ( QApplication::desktop()->width() < 300 ) { 324 if ( QApplication::desktop()->width() < 300 ) {
321 sb = 325 sb =
322 addWidBool(i18n("Week starts on Sunday"), 326 addWidBool(i18n("Week starts on Sunday"),
323 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); 327 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame);
324 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 328 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
325 ++iii; 329 ++iii;
326 sb = 330 sb =
327 addWidBool(i18n("Use short date in (WN/E) view"), 331 addWidBool(i18n("Use short date in (WN/E) view"),
328 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 332 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
329 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 333 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
330 } 334 }
331 else { 335 else {
332 QWidget * hb = new QWidget( topFrame ); 336 QWidget * hb = new QWidget( topFrame );
333 QHBoxLayout *hbLayout = new QHBoxLayout(hb); 337 QHBoxLayout *hbLayout = new QHBoxLayout(hb);
334 sb = 338 sb =
335 addWidBool(i18n("Week starts on Sunday"), 339 addWidBool(i18n("Week starts on Sunday"),
336 &(KOPrefs::instance()->mWeekStartsOnSunday),hb); 340 &(KOPrefs::instance()->mWeekStartsOnSunday),hb);
337 hbLayout->addWidget(sb->checkBox() ); 341 hbLayout->addWidget(sb->checkBox() );
338 sb = 342 sb =
339 addWidBool(i18n("Use short date in (WN/E) view"), 343 addWidBool(i18n("Use short date in (WN/E) view"),
340 &(KOPrefs::instance()->mShortDateInViewer),hb); 344 &(KOPrefs::instance()->mShortDateInViewer),hb);
341 hbLayout->addWidget(sb->checkBox() ); 345 hbLayout->addWidget(sb->checkBox() );
342 topLayout->addMultiCellWidget(hb, iii,iii,0,1); 346 topLayout->addMultiCellWidget(hb, iii,iii,0,1);
343 347
344 } 348 }
345 //#ifndef DESKTOP_VERSION 349 //#ifndef DESKTOP_VERSION
346#if 0 350#if 0
347 ++iii; 351 ++iii;
348 sb = 352 sb =
349 addWidBool(i18n("Quick load/save (w/o Unicode)"), 353 addWidBool(i18n("Quick load/save (w/o Unicode)"),
350 &(KOPrefs::instance()->mUseQuicksave),topFrame); 354 &(KOPrefs::instance()->mUseQuicksave),topFrame);
351 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 355 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
352#endif 356#endif
353} 357}
354void KOPrefsDialog::showSyncPage() 358void KOPrefsDialog::showSyncPage()
355{ 359{
356 showPage ( 2 ) ; 360 showPage ( 2 ) ;
357 361
358} 362}
359void KOPrefsDialog::setupSyncAlgTab() 363void KOPrefsDialog::setupSyncAlgTab()
360{ 364{
361#if 0 365#if 0
362 QLabel * lab; 366 QLabel * lab;
363 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); 367 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0);
364 mSetupSyncAlgTab = topFrame; 368 mSetupSyncAlgTab = topFrame;
365 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 369 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
366 topLayout->setSpacing(spacingHint()); 370 topLayout->setSpacing(spacingHint());
367 topLayout->setMargin(marginHint()); 371 topLayout->setMargin(marginHint());
368 int iii = 0; 372 int iii = 0;
369 373
370 KPrefsDialogWidBool *sb = 374 KPrefsDialogWidBool *sb =
371 addWidBool(i18n("Ask for preferences before syncing"), 375 addWidBool(i18n("Ask for preferences before syncing"),
372 &(KOPrefs::instance()->mAskForPreferences),topFrame); 376 &(KOPrefs::instance()->mAskForPreferences),topFrame);
373 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 377 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
374 378
375 ++iii; 379 ++iii;
376 380
377 KPrefsWidRadios *syncPrefsGroup = 381 KPrefsWidRadios *syncPrefsGroup =
378 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), 382 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs),
379 topFrame); 383 topFrame);
380 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); 384 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
381 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); 385 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
382 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); 386 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
383 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); 387 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
384 syncPrefsGroup->addRadio(i18n("Force take local entry always")); 388 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
385 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); 389 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
386 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 390 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
387 ++iii; 391 ++iii;
388 sb = 392 sb =
389 addWidBool(i18n("Show summary after syncing"), 393 addWidBool(i18n("Show summary after syncing"),
390 &(KOPrefs::instance()->mShowSyncSummary),topFrame); 394 &(KOPrefs::instance()->mShowSyncSummary),topFrame);
391 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 395 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
392 396
393 ++iii; 397 ++iii;
394#endif 398#endif
395 399
396 400
397 401
398} 402}
399 403
400 404
401void KOPrefsDialog::setupSyncTab() 405void KOPrefsDialog::setupSyncTab()
402{ 406{
403#if 0 407#if 0
404 QLabel * lab; 408 QLabel * lab;
405 QFrame *topFrame = addPage(i18n("Sync Network"),0,0); 409 QFrame *topFrame = addPage(i18n("Sync Network"),0,0);
406 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 410 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
407 topLayout->setSpacing(spacingHint()); 411 topLayout->setSpacing(spacingHint());
408 topLayout->setMargin(marginHint()); 412 topLayout->setMargin(marginHint());
409 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); 413 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame);
410 int iii = 0; 414 int iii = 0;
411 topLayout->addMultiCellWidget(lab , iii,iii,0,1); 415 topLayout->addMultiCellWidget(lab , iii,iii,0,1);
412 ++iii; 416 ++iii;
413 417
414 mRemoteIPEdit = new QLineEdit(topFrame); 418 mRemoteIPEdit = new QLineEdit(topFrame);
415 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); 419 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame);
416 topLayout->addWidget(lab ,iii,0); 420 topLayout->addWidget(lab ,iii,0);
417 topLayout->addWidget(mRemoteIPEdit,iii,1); 421 topLayout->addWidget(mRemoteIPEdit,iii,1);
418 ++iii; 422 ++iii;
419 mRemoteUser = new QLineEdit(topFrame); 423 mRemoteUser = new QLineEdit(topFrame);
420 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); 424 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame);
421 topLayout->addWidget(lab ,iii,0); 425 topLayout->addWidget(lab ,iii,0);
422 topLayout->addWidget(mRemoteUser, iii,1); 426 topLayout->addWidget(mRemoteUser, iii,1);
423 ++iii; 427 ++iii;
424 428
425 mRemoteFile = new QLineEdit(topFrame); 429 mRemoteFile = new QLineEdit(topFrame);
426 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); 430 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame);
427 topLayout->addWidget(lab ,iii,0); 431 topLayout->addWidget(lab ,iii,0);
428 topLayout->addWidget(mRemoteFile,iii,1); 432 topLayout->addWidget(mRemoteFile,iii,1);
429 ++iii; 433 ++iii;
430 434
431 mLocalTempFile = new QLineEdit(topFrame); 435 mLocalTempFile = new QLineEdit(topFrame);
432 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); 436 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame);
433 topLayout->addWidget(lab ,iii,0); 437 topLayout->addWidget(lab ,iii,0);
434 topLayout->addWidget(mLocalTempFile,iii,1); 438 topLayout->addWidget(mLocalTempFile,iii,1);
435 ++iii; 439 ++iii;
436 440
437 KPrefsDialogWidBool *wb = 441 KPrefsDialogWidBool *wb =
438 addWidBool(i18n("Write back synced file"), 442 addWidBool(i18n("Write back synced file"),
439 &(KOPrefs::instance()->mWriteBackFile),topFrame); 443 &(KOPrefs::instance()->mWriteBackFile),topFrame);
440 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 444 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
441 ++iii; 445 ++iii;
442 wb = 446 wb =
443 addWidBool(i18n("Write back existing entries only"), 447 addWidBool(i18n("Write back existing entries only"),
444 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); 448 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame);
445 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 449 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
446 ++iii; 450 ++iii;
447 451
448#endif 452#endif
449} 453}
450 454
451void KOPrefsDialog::setupMainTab() 455void KOPrefsDialog::setupMainTab()
452{ 456{
453 QFrame *topFrame = addPage(i18n("General"),0,0); 457 QFrame *topFrame = addPage(i18n("General"),0,0);
454 // DesktopIcon("identity",KIcon::SizeMedium)); 458 // DesktopIcon("identity",KIcon::SizeMedium));
455 459
456 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 460 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
457 topLayout->setSpacing(spacingHint()); 461 topLayout->setSpacing(spacingHint());
458 topLayout->setMargin(marginHint()); 462 topLayout->setMargin(marginHint());
459 463
460 // KPrefsDialogWidBool *emailControlCenter = 464 // KPrefsDialogWidBool *emailControlCenter =
461// addWidBool(i18n("&Use email settings from Control Center"), 465// addWidBool(i18n("&Use email settings from Control Center"),
462// &(KOPrefs::instance()->mEmailControlCenter),topFrame); 466// &(KOPrefs::instance()->mEmailControlCenter),topFrame);
463// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); 467// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1);
464 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), 468 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)),
465 // SLOT(toggleEmailSettings(bool))); 469 // SLOT(toggleEmailSettings(bool)));
466 470
467 mNameEdit = new QLineEdit(topFrame); 471 mNameEdit = new QLineEdit(topFrame);
468 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 472 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
469 topLayout->addWidget(mNameLabel,0,0); 473 topLayout->addWidget(mNameLabel,0,0);
470 topLayout->addWidget(mNameEdit,0,1); 474 topLayout->addWidget(mNameEdit,0,1);
471 475
472 mEmailEdit = new QLineEdit(topFrame); 476 mEmailEdit = new QLineEdit(topFrame);
473 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 477 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
474 topLayout->addWidget(mEmailLabel,1,0); 478 topLayout->addWidget(mEmailLabel,1,0);
475 topLayout->addWidget(mEmailEdit,1,1); 479 topLayout->addWidget(mEmailEdit,1,1);
476 KPrefsDialogWidBool *wb; 480 KPrefsDialogWidBool *wb;
477 QHBox *dummy; 481 QHBox *dummy;
478 if ( QApplication::desktop()->width() > 480 ) { 482 if ( QApplication::desktop()->width() > 480 ) {
479 dummy = new QHBox(topFrame); 483 dummy = new QHBox(topFrame);
480 } else { 484 } else {
481 dummy = new QVBox(topFrame); 485 dummy = new QVBox(topFrame);
482 } 486 }
483 487
484 topLayout->addMultiCellWidget(dummy, 2,2,0,1); 488 topLayout->addMultiCellWidget(dummy, 2,2,0,1);
485 addWidBool(i18n("Full menu bar(nr)"), 489 addWidBool(i18n("Full menu bar(nr)"),
486 &(KOPrefs::instance()->mShowFullMenu),dummy); 490 &(KOPrefs::instance()->mShowFullMenu),dummy);
487 491
488 492
489 addWidBool(i18n("Mini icons in toolbar(nr)"), 493 addWidBool(i18n("Mini icons in toolbar(nr)"),
490 &(KOPrefs::instance()->mToolBarMiniIcons),dummy); 494 &(KOPrefs::instance()->mToolBarMiniIcons),dummy);
491 495
492 496
493 dummy = new QHBox(topFrame); 497 dummy = new QHBox(topFrame);
494 new QLabel(i18n("Days in What's Next:"),dummy); 498 new QLabel(i18n("Days in What's Next:"),dummy);
495 mWhatsNextSpin = new QSpinBox(1,14,1,dummy); 499 mWhatsNextSpin = new QSpinBox(1,14,1,dummy);
496 500
497 topLayout->addMultiCellWidget(dummy,3,3,0,1); 501 topLayout->addMultiCellWidget(dummy,3,3,0,1);
498 502
499 503
500 504
501 dummy = new QHBox(topFrame); 505 dummy = new QHBox(topFrame);
502 new QLabel(i18n("Days in Next-X-Days:"),dummy); 506 new QLabel(i18n("Days in Next-X-Days:"),dummy);
503 mNextXDaysSpin = new QSpinBox(2,14,1,dummy); 507 mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
504 508
505 topLayout->addMultiCellWidget(dummy,4,4,0,1); 509 topLayout->addMultiCellWidget(dummy,4,4,0,1);
506 510
507 QHBox *prioBox = new QHBox(topFrame); 511 QHBox *prioBox = new QHBox(topFrame);
508 // intervalBox->setSpacing(spacingHint()); 512 // intervalBox->setSpacing(spacingHint());
509 topLayout->addMultiCellWidget(prioBox,5,5,0,1); 513 topLayout->addMultiCellWidget(prioBox,5,5,0,1);
510 QString messa = i18n("Show topmost todo prios in What's Next:"); 514 QString messa = i18n("Show topmost todo prios in What's Next:");
511 515
512 if ( QApplication::desktop()->width() < 300 ) 516 if ( QApplication::desktop()->width() < 300 )
513 messa = i18n("Show topmost todo prios in What's N.:"); 517 messa = i18n("Show topmost todo prios in What's N.:");
514 QLabel *prioLabel = new QLabel(messa, prioBox); 518 QLabel *prioLabel = new QLabel(messa, prioBox);
515 mPrioSpin = new QSpinBox(0,5,1,prioBox); 519 mPrioSpin = new QSpinBox(0,5,1,prioBox);
516 if ( QApplication::desktop()->width() < 300 ) 520 if ( QApplication::desktop()->width() < 300 )
517 mPrioSpin->setFixedWidth( 40 ); 521 mPrioSpin->setFixedWidth( 40 );
518 522
519 // KPrefsDialogWidBool *bcc = 523 // KPrefsDialogWidBool *bcc =
520// addWidBool(i18n("Send copy to owner when mailing events"), 524// addWidBool(i18n("Send copy to owner when mailing events"),
521// &(KOPrefs::instance()->mBcc),topFrame); 525// &(KOPrefs::instance()->mBcc),topFrame);
522// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); 526// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1);
523 527
524 528
525 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); 529 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame);
526 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); 530 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1);
527 531
528 // addWidBool(i18n("Enable automatic saving of calendar"), 532 // addWidBool(i18n("Enable automatic saving of calendar"),
529 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); 533 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
530 534
531 QHBox *intervalBox = new QHBox(topFrame); 535 QHBox *intervalBox = new QHBox(topFrame);
532 // intervalBox->setSpacing(spacingHint()); 536 // intervalBox->setSpacing(spacingHint());
533 topLayout->addMultiCellWidget(intervalBox,6,6,0,1); 537 topLayout->addMultiCellWidget(intervalBox,6,6,0,1);
534 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); 538 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox);
535 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); 539 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox);
536 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); 540 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin);
537 /* 541 /*
538 QHBox * agendasize = new QHBox ( topFrame ); 542 QHBox * agendasize = new QHBox ( topFrame );
539 543
540 new QLabel (i18n("AllDayAgenda Height:"), agendasize ); 544 new QLabel (i18n("AllDayAgenda Height:"), agendasize );
541 545
542 546
543 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); 547 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize);
544 topLayout->addMultiCellWidget(agendasize,7,7,0,1); 548 topLayout->addMultiCellWidget(agendasize,7,7,0,1);
545 */ 549 */
546 KPrefsDialogWidBool *verticalScreen = 550 KPrefsDialogWidBool *verticalScreen =
547 addWidBool(i18n("Show vertical screen (Needs restart)"), 551 addWidBool(i18n("Show vertical screen (Needs restart)"),
548 &(KOPrefs::instance()->mVerticalScreen),topFrame); 552 &(KOPrefs::instance()->mVerticalScreen),topFrame);
549 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); 553 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0);
550 topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); 554 topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1);
551 555
552 KPrefsDialogWidBool *ask = 556 KPrefsDialogWidBool *ask =
553 addWidBool(i18n("Ask for quit when closing KO/Pi"), 557 addWidBool(i18n("Ask for quit when closing KO/Pi"),
554 &(KOPrefs::instance()->mAskForQuit),topFrame); 558 &(KOPrefs::instance()->mAskForQuit),topFrame);
555 topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); 559 topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1);
556 560
557 561
558 /* 562 /*
559 KPrefsDialogWidBool *confirmCheck = 563 KPrefsDialogWidBool *confirmCheck =
560 addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), 564 addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm),
561 topFrame); 565 topFrame);
562 topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); 566 topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1);
563 567
564 568
565 mEnableGroupScheduling = 569 mEnableGroupScheduling =
566 addWidBool(i18n("Enable group scheduling"), 570 addWidBool(i18n("Enable group scheduling"),
567 &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); 571 &(KOPrefs::instance()->mEnableGroupScheduling),topFrame);
568 topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); 572 topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0);
569 connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), 573 connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()),
570 SLOT(warningGroupScheduling())); 574 SLOT(warningGroupScheduling()));
571 575
572 mEnableProjectView = 576 mEnableProjectView =
573 addWidBool(i18n("Enable project view"), 577 addWidBool(i18n("Enable project view"),
574 &(KOPrefs::instance()->mEnableProjectView),topFrame); 578 &(KOPrefs::instance()->mEnableProjectView),topFrame);
575 topLayout->addWidget(mEnableProjectView->checkBox(),9,0); 579 topLayout->addWidget(mEnableProjectView->checkBox(),9,0);
576 connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), 580 connect(mEnableProjectView->checkBox(),SIGNAL(clicked()),
577 SLOT(warningProjectView())); 581 SLOT(warningProjectView()));
578 582
579 // Can't be disabled anymore 583 // Can't be disabled anymore
580 mEnableGroupScheduling->checkBox()->hide(); 584 mEnableGroupScheduling->checkBox()->hide();
581 585
582 // Disable setting, because this feature now becomes stable 586 // Disable setting, because this feature now becomes stable
583 mEnableProjectView->checkBox()->hide(); 587 mEnableProjectView->checkBox()->hide();
584 588
585 KPrefsWidRadios *defaultFormatGroup = 589 KPrefsWidRadios *defaultFormatGroup =
586 addWidRadios(i18n("Default Calendar Format"), 590 addWidRadios(i18n("Default Calendar Format"),
587 &(KOPrefs::instance()->mDefaultFormat),topFrame); 591 &(KOPrefs::instance()->mDefaultFormat),topFrame);
588 defaultFormatGroup->addRadio(i18n("vCalendar")); 592 defaultFormatGroup->addRadio(i18n("vCalendar"));
589 defaultFormatGroup->addRadio(i18n("iCalendar")); 593 defaultFormatGroup->addRadio(i18n("iCalendar"));
590 594
591 topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); 595 topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1);
592 596
593 // Default format unconditionally is iCalendar 597 // Default format unconditionally is iCalendar
594 defaultFormatGroup->groupBox()->hide(); 598 defaultFormatGroup->groupBox()->hide();
595 599
596 KPrefsWidRadios *mailClientGroup = 600 KPrefsWidRadios *mailClientGroup =
597 addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), 601 addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient),
598 topFrame); 602 topFrame);
599 mailClientGroup->addRadio(i18n("KMail")); 603 mailClientGroup->addRadio(i18n("KMail"));
600 mailClientGroup->addRadio(i18n("Sendmail")); 604 mailClientGroup->addRadio(i18n("Sendmail"));
601 topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); 605 topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1);
602 606
603 KPrefsDialogWidBool *htmlsave = 607 KPrefsDialogWidBool *htmlsave =
604 addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), 608 addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave),
605 topFrame); 609 topFrame);
606 topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); 610 topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1);
607 611
608 KPrefsWidRadios *destinationGroup = 612 KPrefsWidRadios *destinationGroup =
609 addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), 613 addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination),
610 topFrame); 614 topFrame);
611 destinationGroup->addRadio(i18n("be added to the standard resource")); 615 destinationGroup->addRadio(i18n("be added to the standard resource"));
612 destinationGroup->addRadio(i18n("be asked which resource to use")); 616 destinationGroup->addRadio(i18n("be asked which resource to use"));
613 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); 617 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1);
614 618
615 topLayout->setRowStretch(14,1); 619 topLayout->setRowStretch(14,1);
616 */ 620 */
617} 621}
618 622
619 623
620void KOPrefsDialog::setupTimeTab() 624void KOPrefsDialog::setupTimeTab()
621{ 625{
622 QFrame *topFrame = addPage(i18n("Time"),0,0); 626 QFrame *topFrame = addPage(i18n("Time"),0,0);
623 // DesktopIcon("clock",KIcon::SizeMedium)); 627 // DesktopIcon("clock",KIcon::SizeMedium));
624 628
625 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 629 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
626 topLayout->setSpacing(spacingHint()); 630 topLayout->setSpacing(spacingHint());
627 topLayout->setMargin(marginHint()); 631 topLayout->setMargin(marginHint());
628 632
629 QHBox *dummy = new QHBox(topFrame); 633 QHBox *dummy = new QHBox(topFrame);
630 KPrefsWidTime *dayBegins = 634 KPrefsWidTime *dayBegins =
631 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 635 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
632 dummy); 636 dummy);
633 //topLayout->addWidget(dayBegins->label(),2,0); 637 //topLayout->addWidget(dayBegins->label(),2,0);
634 638
635 //topLayout->addWidget(dayBegins->spinBox(),2,1); 639 //topLayout->addWidget(dayBegins->spinBox(),2,1);
636 topLayout->addMultiCellWidget(dummy,0,0,0,1); 640 topLayout->addMultiCellWidget(dummy,0,0,0,1);
637 641
638 topLayout->addWidget(new QLabel(i18n("Default appointment time:"), 642 topLayout->addWidget(new QLabel(i18n("Default appointment time:"),
639 topFrame),1,0); 643 topFrame),1,0);
640 mStartTimeSpin = new QSpinBox(0,23,1,topFrame); 644 mStartTimeSpin = new QSpinBox(0,23,1,topFrame);
641 mStartTimeSpin->setSuffix(":00"); 645 mStartTimeSpin->setSuffix(":00");
642 topLayout->addWidget(mStartTimeSpin,1,1); 646 topLayout->addWidget(mStartTimeSpin,1,1);
643 647
644 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), 648 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"),
645 topFrame),2,0); 649 topFrame),2,0);
646 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); 650 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame);
647 mDefaultDurationSpin->setSuffix(":00"); 651 mDefaultDurationSpin->setSuffix(":00");
648 topLayout->addWidget(mDefaultDurationSpin,2,1); 652 topLayout->addWidget(mDefaultDurationSpin,2,1);
649 653
650 QStringList alarmList; 654 QStringList alarmList;
651 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") 655 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes")
652 << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; 656 << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ;
653 topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), 657 topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame),
654 3,0); 658 3,0);
655 mAlarmTimeCombo = new QComboBox(topFrame); 659 mAlarmTimeCombo = new QComboBox(topFrame);
656 mAlarmTimeCombo->insertStringList(alarmList); 660 mAlarmTimeCombo->insertStringList(alarmList);
657 topLayout->addWidget(mAlarmTimeCombo,3,1); 661 topLayout->addWidget(mAlarmTimeCombo,3,1);
658 662
659 663
660 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, 664 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal,
661 i18n("Working Hours"), 665 i18n("Working Hours"),
662 topFrame); 666 topFrame);
663 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); 667 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1);
664 workingHoursGroup->layout()->setSpacing( 0 ); 668 workingHoursGroup->layout()->setSpacing( 0 );
665 workingHoursGroup->layout()->setMargin( 4 ); 669 workingHoursGroup->layout()->setMargin( 4 );
666 QHBox *workStartBox = new QHBox(workingHoursGroup); 670 QHBox *workStartBox = new QHBox(workingHoursGroup);
667 // workStartBox->setMargin( 0 ); 671 // workStartBox->setMargin( 0 );
668 addWidTime(i18n("Daily starting hour:"), 672 addWidTime(i18n("Daily starting hour:"),
669 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); 673 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox);
670 674
671 QHBox *workEndBox = new QHBox(workingHoursGroup); 675 QHBox *workEndBox = new QHBox(workingHoursGroup);
672 //workEndBox->setMargin( 0 ); 676 //workEndBox->setMargin( 0 );
673 addWidTime(i18n("Daily ending hour:"), 677 addWidTime(i18n("Daily ending hour:"),
674 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); 678 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox);
675 QVBox *excludeBox = new QVBox(workingHoursGroup); 679 QVBox *excludeBox = new QVBox(workingHoursGroup);
676 //excludeBox->setMargin( 0 ); 680 //excludeBox->setMargin( 0 );
677 addWidBool(i18n("Exclude holidays"), 681 addWidBool(i18n("Exclude holidays"),
678 &(KOPrefs::instance()->mExcludeHolidays),excludeBox); 682 &(KOPrefs::instance()->mExcludeHolidays),excludeBox);
679 683
680 addWidBool(i18n("Exclude Saturdays"), 684 addWidBool(i18n("Exclude Saturdays"),
681 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); 685 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox);
682 686
683// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), 687// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"),
684 // &(KOPrefs::instance()->mMarcusBainsShowSeconds), 688 // &(KOPrefs::instance()->mMarcusBainsShowSeconds),
685 // topFrame); 689 // topFrame);
686// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); 690// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0);
687 691
688 // topLayout->setRowStretch(6,1); 692 // topLayout->setRowStretch(6,1);
689} 693}
690 694
691 695
692void KOPrefsDialog::setupViewsTab() 696void KOPrefsDialog::setupViewsTab()
693{ 697{
694 698
695 QFrame *topFrame = addPage(i18n("Views"),0,0); 699 QFrame *topFrame = addPage(i18n("Views"),0,0);
696 // DesktopIcon("viewmag",KIcon::SizeMedium)); 700 // DesktopIcon("viewmag",KIcon::SizeMedium));
697 701
698 QGridLayout *topLayout = new QGridLayout(topFrame,6,1); 702 QGridLayout *topLayout = new QGridLayout(topFrame,6,1);
699 topLayout->setSpacing(spacingHint()); 703 topLayout->setSpacing(spacingHint());
700 topLayout->setMargin(marginHint()); 704 topLayout->setMargin(marginHint());
701 705
702// QBoxLayout *dayBeginsLayout = new QHBoxLayout; 706// QBoxLayout *dayBeginsLayout = new QHBoxLayout;
703// topLayout->addLayout(dayBeginsLayout,0,0); 707// topLayout->addLayout(dayBeginsLayout,0,0);
704 708
705// KPrefsWidTime *dayBegins = 709// KPrefsWidTime *dayBegins =
706// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 710// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
707// topFrame); 711// topFrame);
708// dayBeginsLayout->addWidget(dayBegins->label()); 712// dayBeginsLayout->addWidget(dayBegins->label());
709// dayBeginsLayout->addStretch(1); 713// dayBeginsLayout->addStretch(1);
710// dayBeginsLayout->addWidget(dayBegins->spinBox()); 714// dayBeginsLayout->addWidget(dayBegins->spinBox());
711 715
712// QBoxLayout *nextDaysLayout = new QHBoxLayout; 716// QBoxLayout *nextDaysLayout = new QHBoxLayout;
713// topLayout->addLayout(nextDaysLayout,1,0); 717// topLayout->addLayout(nextDaysLayout,1,0);
714// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); 718// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame));
715// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); 719// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame);
716// nextDaysLayout->addStretch(1); 720// nextDaysLayout->addStretch(1);
717// nextDaysLayout->addWidget(mNextXDaysSpin); 721// nextDaysLayout->addWidget(mNextXDaysSpin);
718 722
719 723
720 int ii = 0; 724 int ii = 0;
721 KPrefsDialogWidBool *dummy = 725 KPrefsDialogWidBool *dummy =
722 addWidBool(i18n("Edit item on doubleclick (if not, show)"), 726 addWidBool(i18n("Edit item on doubleclick (if not, show)"),
723 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); 727 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame);
724 topLayout->addWidget(dummy->checkBox(),ii++,0); 728 topLayout->addWidget(dummy->checkBox(),ii++,0);
725 729
726 dummy = 730 dummy =
727 addWidBool(i18n("Highlight current day in agenda"), 731 addWidBool(i18n("Highlight current day in agenda"),
728 &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); 732 &(KOPrefs::instance()->mHighlightCurrentDay),topFrame);
729 topLayout->addWidget(dummy->checkBox(),ii++,0); 733 topLayout->addWidget(dummy->checkBox(),ii++,0);
730 734
731 dummy = 735 dummy =
732 addWidBool(i18n("Use light color for highlight current day"), 736 addWidBool(i18n("Use light color for highlight current day"),
733 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); 737 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame);
734 topLayout->addWidget(dummy->checkBox(),ii++,0); 738 topLayout->addWidget(dummy->checkBox(),ii++,0);
735 739
736 KPrefsDialogWidBool *dailyRecur = 740 KPrefsDialogWidBool *dailyRecur =
737 addWidBool(i18n("Show events that recur daily in date nav."), 741 addWidBool(i18n("Show events that recur daily in date nav."),
738 &(KOPrefs::instance()->mDailyRecur),topFrame); 742 &(KOPrefs::instance()->mDailyRecur),topFrame);
739 topLayout->addWidget(dailyRecur->checkBox(),ii++,0); 743 topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
740 744
741 KPrefsDialogWidBool *weeklyRecur = 745 KPrefsDialogWidBool *weeklyRecur =
742 addWidBool(i18n("Show ev. that recur weekly in date nav."), 746 addWidBool(i18n("Show ev. that recur weekly in date nav."),
743 &(KOPrefs::instance()->mWeeklyRecur),topFrame); 747 &(KOPrefs::instance()->mWeeklyRecur),topFrame);
744 topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); 748 topLayout->addWidget(weeklyRecur->checkBox(),ii++,0);
745 if ( QApplication::desktop()->width() > 640 ) { 749 if ( QApplication::desktop()->width() > 640 ) {
746 750
747 KPrefsDialogWidBool *enableToolTips = 751 KPrefsDialogWidBool *enableToolTips =
748 addWidBool(i18n("Enable tooltips displaying summary of ev."), 752 addWidBool(i18n("Enable tooltips displaying summary of ev."),
749 &(KOPrefs::instance()->mEnableToolTips),topFrame); 753 &(KOPrefs::instance()->mEnableToolTips),topFrame);
750 topLayout->addWidget(enableToolTips->checkBox(),ii++,0); 754 topLayout->addWidget(enableToolTips->checkBox(),ii++,0);
751 755
752 } 756 }
753 KPrefsDialogWidBool *passwdk = 757 KPrefsDialogWidBool *passwdk =
754 addWidBool(i18n("Show parent To-Do's in What's Next view"), 758 addWidBool(i18n("Show parent To-Do's in What's Next view"),
755 &(KOPrefs::instance()->mWNViewShowsParents),topFrame); 759 &(KOPrefs::instance()->mWNViewShowsParents),topFrame);
756 topLayout->addWidget(passwdk->checkBox(), ii++,0); 760 topLayout->addWidget(passwdk->checkBox(), ii++,0);
757 761
758 passwdk = 762 passwdk =
759 addWidBool(i18n("Show location in What's Next view"), 763 addWidBool(i18n("Show location in What's Next view"),
760 &(KOPrefs::instance()->mWNViewShowLocation),topFrame); 764 &(KOPrefs::instance()->mWNViewShowLocation),topFrame);
761 topLayout->addWidget(passwdk->checkBox(), ii++,0); 765 topLayout->addWidget(passwdk->checkBox(), ii++,0);
762 766
763 passwdk = 767 passwdk =
764 addWidBool(i18n("Show Sync Events in WN/Agenda view"), 768 addWidBool(i18n("Show Sync Events in WN/Agenda view"),
765 &(KOPrefs::instance()->mShowSyncEvents),topFrame); 769 &(KOPrefs::instance()->mShowSyncEvents),topFrame);
766 topLayout->addWidget(passwdk->checkBox(), ii++,0); 770 topLayout->addWidget(passwdk->checkBox(), ii++,0);
767 771
768 772
769 KPrefsDialogWidBool *marcusBainsEnabled = 773 KPrefsDialogWidBool *marcusBainsEnabled =
770 addWidBool(i18n("Show Marcus Bains line"), 774 addWidBool(i18n("Show Marcus Bains line"),
771 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); 775 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame);
772 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); 776 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0);
773 777
774 778
775 // topLayout->addWidget(hourSizeGroup,ii++,0); 779 // topLayout->addWidget(hourSizeGroup,ii++,0);
776 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); 780 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0);
777 //topLayout->setRowStretch(11,1); 781 //topLayout->setRowStretch(11,1);
778 782
779 783
780 784
781 785
782 786
783 787
784 topFrame = addPage(i18n("ViewChange"),0,0); 788 topFrame = addPage(i18n("ViewChange"),0,0);
785 // DesktopIcon("viewmag",KIcon::SizeMedium)); 789 // DesktopIcon("viewmag",KIcon::SizeMedium));
786 790
787 topLayout = new QGridLayout(topFrame,6,1); 791 topLayout = new QGridLayout(topFrame,6,1);
788 topLayout->setSpacing(spacingHint()); 792 topLayout->setSpacing(spacingHint());
789 topLayout->setMargin(marginHint()); 793 topLayout->setMargin(marginHint());
790 ii = 0; 794 ii = 0;
791 795
792 796
793 dummy = 797 dummy =
794 addWidBool(i18n("Hold fullscreen on view change"), 798 addWidBool(i18n("Hold fullscreen on view change"),
795 &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); 799 &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame);
796 topLayout->addWidget(dummy->checkBox(),ii++,0); 800 topLayout->addWidget(dummy->checkBox(),ii++,0);
797 801
798 dummy = 802 dummy =
799 addWidBool(i18n("Hold non-fullscreen on view change"), 803 addWidBool(i18n("Hold non-fullscreen on view change"),
800 &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); 804 &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame);
801 topLayout->addWidget(dummy->checkBox(),ii++,0); 805 topLayout->addWidget(dummy->checkBox(),ii++,0);
802 806
803 807
804 KPrefsDialogWidBool *fullViewTodo = 808 KPrefsDialogWidBool *fullViewTodo =
805 addWidBool(i18n("Event list view uses full window"), 809 addWidBool(i18n("Event list view uses full window"),
806 &(KOPrefs::instance()->mFullViewTodo),topFrame); 810 &(KOPrefs::instance()->mFullViewTodo),topFrame);
807 topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); 811 topLayout->addWidget(fullViewTodo->checkBox(),ii++,0);
808 812
809 KPrefsDialogWidBool *fullViewMonth = 813 KPrefsDialogWidBool *fullViewMonth =
810 addWidBool(i18n("Next days view uses full window"), 814 addWidBool(i18n("Next days view uses full window"),
811 &(KOPrefs::instance()->mFullViewMonth),topFrame); 815 &(KOPrefs::instance()->mFullViewMonth),topFrame);
812 topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); 816 topLayout->addWidget(fullViewMonth->checkBox(),ii++,0);
813 817
814 dummy = 818 dummy =
815 addWidBool(i18n("Set agenda to DayBeginsAt on change"), 819 addWidBool(i18n("Set agenda to DayBeginsAt on change"),
816 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); 820 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame);
817 topLayout->addWidget(dummy->checkBox(),ii++,0); 821 topLayout->addWidget(dummy->checkBox(),ii++,0);
818 822
819 dummy = 823 dummy =
820 addWidBool(i18n("Set agenda to current time on change"), 824 addWidBool(i18n("Set agenda to current time on change"),
821 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); 825 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame);
822 topLayout->addWidget(dummy->checkBox(),ii++,0); 826 topLayout->addWidget(dummy->checkBox(),ii++,0);
823 827
824 dummy = 828 dummy =
825 addWidBool(i18n("Listview uses monthly timespan"), 829 addWidBool(i18n("Listview uses monthly timespan"),
826 &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); 830 &(KOPrefs::instance()->mListViewMonthTimespan),topFrame);
827 topLayout->addWidget(dummy->checkBox(),ii++,0); 831 topLayout->addWidget(dummy->checkBox(),ii++,0);
828 dummy = 832 dummy =
829 addWidBool(i18n("Highlight selection in Time Edit"), 833 addWidBool(i18n("Highlight selection in Time Edit"),
830 &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); 834 &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame);
831 topLayout->addWidget( dummy->checkBox(), ii++,0); 835 topLayout->addWidget( dummy->checkBox(), ii++,0);
832 836
833 837
834 838
835 839
836 840
837 topFrame = addPage(i18n("Month View"),0,0); 841 topFrame = addPage(i18n("Month View"),0,0);
838 // DesktopIcon("viewmag",KIcon::SizeMedium)); 842 // DesktopIcon("viewmag",KIcon::SizeMedium));
839 843
840 topLayout = new QGridLayout(topFrame,5,1); 844 topLayout = new QGridLayout(topFrame,5,1);
841 topLayout->setSpacing(spacingHint()); 845 topLayout->setSpacing(spacingHint());
842 topLayout->setMargin(marginHint()); 846 topLayout->setMargin(marginHint());
843 ii = 0; 847 ii = 0;