summaryrefslogtreecommitdiffabout
path: root/kmicromail/koprefsdialog.cpp
Unidiff
Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/koprefsdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 598d12f..c878fc9 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -1,407 +1,407 @@
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 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 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
97KOPrefsDialog::~KOPrefsDialog() 97KOPrefsDialog::~KOPrefsDialog()
98{ 98{
99} 99}
100void KOPrefsDialog::setupGlobalTab() 100void 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}
109void KOPrefsDialog::setupMainTab() 109void 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
134void KOPrefsDialog::setupMailTab() 134void 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 150
151 151
152} 152}
153void KOPrefsDialog::setupFontsTab() 153void KOPrefsDialog::setupFontsTab()
154{ 154{
155 155
156 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 156 QFrame *topFrame = addPage(i18n("Fonts"),0,0);
157 // DesktopIcon("fonts",KIcon::SizeMedium)); 157 // DesktopIcon("fonts",KIcon::SizeMedium));
158 158
159 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 159 QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
160 topLayout->setSpacing(1); 160 topLayout->setSpacing(1);
161 topLayout->setMargin(3); 161 topLayout->setMargin(3);
162 KPrefsDialogWidFont * tVFont; 162 KPrefsDialogWidFont * tVFont;
163 int i = 0; 163 int i = 0;
164 KPrefsDialogWidFont *timeLabelsFont = 164 KPrefsDialogWidFont *timeLabelsFont =
165 addWidFont(i18n("OK"),i18n("Application(nr)"), 165 addWidFont(i18n("OK"),i18n("Application(nr)"),
166 &(KOPrefs::instance()->mAppFont),topFrame); 166 &(KOPrefs::instance()->mAppFont),topFrame);
167 topLayout->addWidget(timeLabelsFont->label(),i,0); 167 topLayout->addWidget(timeLabelsFont->label(),i,0);
168 topLayout->addWidget(timeLabelsFont->preview(),i,1); 168 topLayout->addWidget(timeLabelsFont->preview(),i,1);
169 topLayout->addWidget(timeLabelsFont->button(),i,2); 169 topLayout->addWidget(timeLabelsFont->button(),i,2);
170 ++i; 170 ++i;
171 171
172 172
173 timeLabelsFont = 173 timeLabelsFont =
174 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), 174 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"),
175 &(KOPrefs::instance()->mComposeFont),topFrame); 175 &(KOPrefs::instance()->mComposeFont),topFrame);
176 topLayout->addWidget(timeLabelsFont->label(),i,0); 176 topLayout->addWidget(timeLabelsFont->label(),i,0);
177 topLayout->addWidget(timeLabelsFont->preview(),i,1); 177 topLayout->addWidget(timeLabelsFont->preview(),i,1);
178 topLayout->addWidget(timeLabelsFont->button(),i,2); 178 topLayout->addWidget(timeLabelsFont->button(),i,2);
179 ++i; 179 ++i;
180 180
181 KPrefsDialogWidFont *timeBarFont = 181 KPrefsDialogWidFont *timeBarFont =
182 addWidFont(i18n("Hello"),i18n("Read mail:"), 182 addWidFont(i18n("Hello"),i18n("Read mail:"),
183 &(KOPrefs::instance()->mReadFont),topFrame); 183 &(KOPrefs::instance()->mReadFont),topFrame);
184 topLayout->addWidget(timeBarFont->label(),i,0); 184 topLayout->addWidget(timeBarFont->label(),i,0);
185 topLayout->addWidget(timeBarFont->preview(),i,1); 185 topLayout->addWidget(timeBarFont->preview(),i,1);
186 topLayout->addWidget(timeBarFont->button(),i,2); 186 topLayout->addWidget(timeBarFont->button(),i,2);
187 ++i; 187 ++i;
188 188
189 topLayout->setColStretch(1,1); 189 topLayout->setColStretch(1,1);
190 topLayout->setRowStretch(4,1); 190 topLayout->setRowStretch(4,1);
191 191
192} 192}
193void KOPrefsDialog::usrReadConfig() 193void KOPrefsDialog::usrReadConfig()
194{ 194{
195 195
196 mNameEdit->setText(KOPrefs::instance()->mName); 196 mNameEdit->setText(KOPrefs::instance()->mName);
197 mEmailEdit->setText(KOPrefs::instance()->mEmail); 197 mEmailEdit->setText(KOPrefs::instance()->mEmail);
198 kdelibcfg->readConfig(); 198 kdelibcfg->readConfig();
199} 199}
200void KOPrefsDialog::usrWriteConfig() 200void KOPrefsDialog::usrWriteConfig()
201{ 201{
202 KOPrefs::instance()->mName = mNameEdit->text(); 202 KOPrefs::instance()->mName = mNameEdit->text();
203 KOPrefs::instance()->mEmail = mEmailEdit->text(); 203 KOPrefs::instance()->mEmail = mEmailEdit->text();
204 kdelibcfg->writeConfig(); 204 kdelibcfg->writeConfig();
205 205
206 206
207} 207}
208 208
209#if 0 209#if 0
210void KOPrefsDialog::setupLocaleDateTab() 210void KOPrefsDialog::setupLocaleDateTab()
211{ 211{
212QFrame *topFrame = addPage(i18n("Date Format"),0,0); 212QFrame *topFrame = addPage(i18n("Date Format"),0,0);
213 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 213 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
214 topLayout->setSpacing(spacingHint()); 214 topLayout->setSpacing(spacingHint());
215 topLayout->setMargin(marginHint()); 215 topLayout->setMargin(marginHint());
216 int iii = 0; 216 int iii = 0;
217 217
218 218
219 KPrefsWidRadios *syncPrefsGroup = 219 KPrefsWidRadios *syncPrefsGroup =
220 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 220 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
221 QString format; 221 QString format;
222 if ( QApplication::desktop()->width() < 480 ) 222 if ( QApplication::desktop()->width() < 480 )
223 format = "(%d.%m.%Y)"; 223 format = "(%d.%m.%Y)";
224 else 224 else
225 format = "(%d.%m.%Y|%A %d %B %Y)"; 225 format = "(%d.%m.%Y|%A %d %B %Y)";
226 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 226 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
227 if ( QApplication::desktop()->width() < 480 ) 227 if ( QApplication::desktop()->width() < 480 )
228 format = "(%m.%d.%Y)"; 228 format = "(%m.%d.%Y)";
229 else 229 else
230 format = "(%m.%d.%Y|%A %B %d %Y)"; 230 format = "(%m.%d.%Y|%A %B %d %Y)";
231 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 231 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
232 if ( QApplication::desktop()->width() < 480 ) 232 if ( QApplication::desktop()->width() < 480 )
233 format = "(%Y-%m-%d)"; 233 format = "(%Y-%m-%d)";
234 else 234 else
235 format = "(%Y-%m-%d|%A %Y %B %d)"; 235 format = "(%Y-%m-%d|%A %Y %B %d)";
236 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 236 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
237 syncPrefsGroup->addRadio(i18n("User defined")); 237 syncPrefsGroup->addRadio(i18n("User defined"));
238 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 238 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
239 ++iii; 239 ++iii;
240 ++iii; 240 ++iii;
241 QLabel * lab; 241 QLabel * lab;
242 mUserDateFormatLong = new QLineEdit(topFrame); 242 mUserDateFormatLong = new QLineEdit(topFrame);
243 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 243 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
244 topLayout->addWidget(lab ,iii,0); 244 topLayout->addWidget(lab ,iii,0);
245 topLayout->addWidget(mUserDateFormatLong,iii,1); 245 topLayout->addWidget(mUserDateFormatLong,iii,1);
246 ++iii; 246 ++iii;
247 mUserDateFormatShort = new QLineEdit(topFrame); 247 mUserDateFormatShort = new QLineEdit(topFrame);
248 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 248 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
249 topLayout->addWidget(lab ,iii,0); 249 topLayout->addWidget(lab ,iii,0);
250 topLayout->addWidget(mUserDateFormatShort,iii,1); 250 topLayout->addWidget(mUserDateFormatShort,iii,1);
251 ++iii; 251 ++iii;
252 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 252 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
253 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 253 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
254 ++iii; 254 ++iii;
255 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 255 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
256 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 256 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
257 ++iii; 257 ++iii;
258 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 258 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
259 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 259 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
260 ++iii; 260 ++iii;
261 261
262} 262}
263 263
264void KOPrefsDialog::setupLocaleTab() 264void KOPrefsDialog::setupLocaleTab()
265{ 265{
266 QFrame *topFrame = addPage(i18n("Locale"),0,0); 266 QFrame *topFrame = addPage(i18n("Locale"),0,0);
267 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 267 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
268 topLayout->setSpacing(spacingHint()); 268 topLayout->setSpacing(spacingHint());
269 topLayout->setMargin(marginHint()); 269 topLayout->setMargin(marginHint());
270 int iii = 0; 270 int iii = 0;
271 KPrefsWidRadios *syncPrefsGroup = 271 KPrefsWidRadios *syncPrefsGroup =
272 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); 272 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame);
273 syncPrefsGroup->addRadio(i18n("English")); 273 syncPrefsGroup->addRadio(i18n("English"));
274 syncPrefsGroup->addRadio(i18n("German")); 274 syncPrefsGroup->addRadio(i18n("German"));
275 syncPrefsGroup->addRadio(i18n("French")); 275 syncPrefsGroup->addRadio(i18n("French"));
276 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 276 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
277 if ( QApplication::desktop()->width() < 300 ) 277 if ( QApplication::desktop()->width() < 300 )
278 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 278 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
279 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 279 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
280 ++iii; 280 ++iii;
281 281
282 syncPrefsGroup = 282 syncPrefsGroup =
283 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); 283 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame);
284 if ( QApplication::desktop()->width() > 300 ) 284 if ( QApplication::desktop()->width() > 300 )
285 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 285 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
286 syncPrefsGroup->addRadio(i18n("24:00")); 286 syncPrefsGroup->addRadio(i18n("24:00"));
287 syncPrefsGroup->addRadio(i18n("12:00am")); 287 syncPrefsGroup->addRadio(i18n("12:00am"));
288 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 288 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
289 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 289 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
290 ++iii; 290 ++iii;
291 KPrefsDialogWidBool *sb; 291 KPrefsDialogWidBool *sb;
292 if ( QApplication::desktop()->width() < 300 ) { 292 if ( QApplication::desktop()->width() < 300 ) {
293 sb = 293 sb =
294 addWidBool(i18n("Week starts on Sunday"), 294 addWidBool(i18n("Week starts on Sunday"),
295 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); 295 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame);
296 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 296 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
297 ++iii; 297 ++iii;
298 sb = 298 sb =
299 addWidBool(i18n("Use short date in (WN/E) view"), 299 addWidBool(i18n("Use short date in (WN/E) view"),
300 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 300 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
301 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 301 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
302 } 302 }
303 else { 303 else {
304 QWidget * hb = new QWidget( topFrame ); 304 QWidget * hb = new QWidget( topFrame );
305 QHBoxLayout *hbLayout = new QHBoxLayout(hb); 305 QHBoxLayout *hbLayout = new QHBoxLayout(hb);
306 sb = 306 sb =
307 addWidBool(i18n("Week starts on Sunday"), 307 addWidBool(i18n("Week starts on Sunday"),
308 &(KOPrefs::instance()->mWeekStartsOnSunday),hb); 308 &(KOPrefs::instance()->mWeekStartsOnSunday),hb);
309 hbLayout->addWidget(sb->checkBox() ); 309 hbLayout->addWidget(sb->checkBox() );
310 sb = 310 sb =
311 addWidBool(i18n("Use short date in (WN/E) view"), 311 addWidBool(i18n("Use short date in (WN/E) view"),
312 &(KOPrefs::instance()->mShortDateInViewer),hb); 312 &(KOPrefs::instance()->mShortDateInViewer),hb);
313 hbLayout->addWidget(sb->checkBox() ); 313 hbLayout->addWidget(sb->checkBox() );
314 topLayout->addMultiCellWidget(hb, iii,iii,0,1); 314 topLayout->addMultiCellWidget(hb, iii,iii,0,1);
315 315
316 } 316 }
317 //#ifndef DESKTOP_VERSION 317 //#ifndef DESKTOP_VERSION
318#if 0 318#if 0
319 ++iii; 319 ++iii;
320 sb = 320 sb =
321 addWidBool(i18n("Quick load/save (w/o Unicode)"), 321 addWidBool(i18n("Quick load/save (w/o Unicode)"),
322 &(KOPrefs::instance()->mUseQuicksave),topFrame); 322 &(KOPrefs::instance()->mUseQuicksave),topFrame);
323 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 323 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
324#endif 324#endif
325} 325}
326void KOPrefsDialog::showSyncPage() 326void KOPrefsDialog::showSyncPage()
327{ 327{
328 showPage ( 2 ) ; 328 showPage ( 2 ) ;
329 329
330} 330}
331void KOPrefsDialog::setupSyncAlgTab() 331void KOPrefsDialog::setupSyncAlgTab()
332{ 332{
333#if 0 333#if 0
334 QLabel * lab; 334 QLabel * lab;
335 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); 335 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0);
336 mSetupSyncAlgTab = topFrame; 336 mSetupSyncAlgTab = topFrame;
337 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 337 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
338 topLayout->setSpacing(spacingHint()); 338 topLayout->setSpacing(spacingHint());
339 topLayout->setMargin(marginHint()); 339 topLayout->setMargin(marginHint());
340 int iii = 0; 340 int iii = 0;
341 341
342 KPrefsDialogWidBool *sb = 342 KPrefsDialogWidBool *sb =
343 addWidBool(i18n("Ask for preferences before syncing"), 343 addWidBool(i18n("Ask for preferences before syncing"),
344 &(KOPrefs::instance()->mAskForPreferences),topFrame); 344 &(KOPrefs::instance()->mAskForPreferences),topFrame);
345 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 345 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
346 346
347 ++iii; 347 ++iii;
348 348
349 KPrefsWidRadios *syncPrefsGroup = 349 KPrefsWidRadios *syncPrefsGroup =
350 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), 350 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs),
351 topFrame); 351 topFrame);
352 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); 352 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
353 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); 353 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
354 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); 354 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
355 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); 355 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
356 syncPrefsGroup->addRadio(i18n("Force take local entry always")); 356 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
357 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); 357 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
358 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 358 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
359 ++iii; 359 ++iii;
360 sb = 360 sb =
361 addWidBool(i18n("Show summary after syncing"), 361 addWidBool(i18n("Show summary after syncing"),
362 &(KOPrefs::instance()->mShowSyncSummary),topFrame); 362 &(KOPrefs::instance()->mShowSyncSummary),topFrame);
363 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 363 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
364 364
365 ++iii; 365 ++iii;
366#endif 366#endif
367 367
368 368
369 369
370} 370}
371 371
372 372
373void KOPrefsDialog::setupSyncTab() 373void KOPrefsDialog::setupSyncTab()
374{ 374{
375#if 0 375#if 0
376 QLabel * lab; 376 QLabel * lab;
377 QFrame *topFrame = addPage(i18n("Sync Network"),0,0); 377 QFrame *topFrame = addPage(i18n("Sync Network"),0,0);
378 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 378 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
379 topLayout->setSpacing(spacingHint()); 379 topLayout->setSpacing(spacingHint());
380 topLayout->setMargin(marginHint()); 380 topLayout->setMargin(marginHint());
381 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); 381 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame);
382 int iii = 0; 382 int iii = 0;
383 topLayout->addMultiCellWidget(lab , iii,iii,0,1); 383 topLayout->addMultiCellWidget(lab , iii,iii,0,1);
384 ++iii; 384 ++iii;
385 385
386 mRemoteIPEdit = new QLineEdit(topFrame); 386 mRemoteIPEdit = new QLineEdit(topFrame);
387 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); 387 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame);
388 topLayout->addWidget(lab ,iii,0); 388 topLayout->addWidget(lab ,iii,0);
389 topLayout->addWidget(mRemoteIPEdit,iii,1); 389 topLayout->addWidget(mRemoteIPEdit,iii,1);
390 ++iii; 390 ++iii;
391 mRemoteUser = new QLineEdit(topFrame); 391 mRemoteUser = new QLineEdit(topFrame);
392 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); 392 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame);
393 topLayout->addWidget(lab ,iii,0); 393 topLayout->addWidget(lab ,iii,0);
394 topLayout->addWidget(mRemoteUser, iii,1); 394 topLayout->addWidget(mRemoteUser, iii,1);
395 ++iii; 395 ++iii;
396 396
397 mRemoteFile = new QLineEdit(topFrame); 397 mRemoteFile = new QLineEdit(topFrame);
398 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); 398 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame);
399 topLayout->addWidget(lab ,iii,0); 399 topLayout->addWidget(lab ,iii,0);
400 topLayout->addWidget(mRemoteFile,iii,1); 400 topLayout->addWidget(mRemoteFile,iii,1);
401 ++iii; 401 ++iii;
402 402
403 mLocalTempFile = new QLineEdit(topFrame); 403 mLocalTempFile = new QLineEdit(topFrame);
404 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); 404 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame);
405 topLayout->addWidget(lab ,iii,0); 405 topLayout->addWidget(lab ,iii,0);
406 topLayout->addWidget(mLocalTempFile,iii,1); 406 topLayout->addWidget(mLocalTempFile,iii,1);
407 ++iii; 407 ++iii;