Diffstat (limited to 'korganizer/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koprefsdialog.cpp | 106 |
1 files changed, 61 insertions, 45 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 7dafcd8..b4b3b27 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -36,238 +36,242 @@ | |||
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 <kurlrequester.h> | 57 | #include <kurlrequester.h> |
58 | #include <klineedit.h> | 58 | #include <klineedit.h> |
59 | 59 | ||
60 | #if defined(USE_SOLARIS) | 60 | #if defined(USE_SOLARIS) |
61 | #include <sys/param.h> | 61 | #include <sys/param.h> |
62 | 62 | ||
63 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" | 63 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" |
64 | #define INITFILE "/etc/default/init" | 64 | #define INITFILE "/etc/default/init" |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | #include "koprefs.h" | 67 | #include "koprefs.h" |
68 | 68 | ||
69 | #include "koprefsdialog.h" | 69 | #include "koprefsdialog.h" |
70 | #include "kpimglobalprefs.h" | 70 | #include "kpimglobalprefs.h" |
71 | 71 | ||
72 | 72 | ||
73 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 73 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
74 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 74 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
75 | { | 75 | { |
76 | 76 | ||
77 | setCaption( i18n("Preferences - some settings need a restart (nr)")); | 77 | setCaption( i18n("Preferences - some settings need a restart (nr)")); |
78 | mCategoryDict.setAutoDelete(true); | 78 | mCategoryDict.setAutoDelete(true); |
79 | 79 | ||
80 | KGlobal::locale()->insertCatalogue("timezones"); | 80 | KGlobal::locale()->insertCatalogue("timezones"); |
81 | 81 | ||
82 | setupGlobalTab(); | 82 | setupGlobalTab(); |
83 | setupMainTab(); | 83 | setupMainTab(); |
84 | setupLocaleTab(); | 84 | // setupLocaleTab(); |
85 | setupTimeZoneTab(); | 85 | //setupTimeZoneTab(); |
86 | setupTimeTab(); | 86 | setupTimeTab(); |
87 | setupLocaleDateTab(); | 87 | //setupLocaleDateTab(); |
88 | setupFontsTab(); | 88 | setupFontsTab(); |
89 | setupColorsTab(); | 89 | setupColorsTab(); |
90 | setupViewsTab(); | 90 | setupViewsTab(); |
91 | //setupSyncTab(); | 91 | //setupSyncTab(); |
92 | //setupSyncAlgTab(); | 92 | //setupSyncAlgTab(); |
93 | //setupPrinterTab(); | 93 | //setupPrinterTab(); |
94 | //setupGroupSchedulingTab(); | 94 | //setupGroupSchedulingTab(); |
95 | //setupGroupAutomationTab(); | 95 | //setupGroupAutomationTab(); |
96 | } | 96 | } |
97 | 97 | ||
98 | 98 | ||
99 | KOPrefsDialog::~KOPrefsDialog() | 99 | KOPrefsDialog::~KOPrefsDialog() |
100 | { | 100 | { |
101 | } | 101 | } |
102 | void KOPrefsDialog::setupGlobalTab() | 102 | void KOPrefsDialog::setupGlobalTab() |
103 | { | 103 | { |
104 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 104 | QFrame *topFrame = addPage(i18n("Global"),0,0); |
105 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 105 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); |
106 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 106 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); |
107 | topLayout->addWidget( kdelibcfg ); | 107 | topLayout->addWidget( kdelibcfg ); |
108 | 108 | ||
109 | 109 | ||
110 | } | 110 | } |
111 | void KOPrefsDialog::setupLocaleDateTab() | 111 | void KOPrefsDialog::setupLocaleDateTab() |
112 | { | 112 | { |
113 | #if 0 | ||
113 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 114 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
114 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 115 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
115 | topLayout->setSpacing(spacingHint()); | 116 | topLayout->setSpacing(spacingHint()); |
116 | topLayout->setMargin(marginHint()); | 117 | topLayout->setMargin(marginHint()); |
117 | int iii = 0; | 118 | int iii = 0; |
118 | 119 | ||
119 | 120 | ||
120 | KPrefsDialogWidRadios *syncPrefsGroup = | 121 | KPrefsDialogWidRadios *syncPrefsGroup = |
121 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 122 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
122 | QString format; | 123 | QString format; |
123 | if ( QApplication::desktop()->width() < 480 ) | 124 | if ( QApplication::desktop()->width() < 480 ) |
124 | format = "(%d.%m.%Y)"; | 125 | format = "(%d.%m.%Y)"; |
125 | else | 126 | else |
126 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 127 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
127 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 128 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
128 | if ( QApplication::desktop()->width() < 480 ) | 129 | if ( QApplication::desktop()->width() < 480 ) |
129 | format = "(%m.%d.%Y)"; | 130 | format = "(%m.%d.%Y)"; |
130 | else | 131 | else |
131 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 132 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
132 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 133 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
133 | if ( QApplication::desktop()->width() < 480 ) | 134 | if ( QApplication::desktop()->width() < 480 ) |
134 | format = "(%Y-%m-%d)"; | 135 | format = "(%Y-%m-%d)"; |
135 | else | 136 | else |
136 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 137 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
137 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 138 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
138 | syncPrefsGroup->addRadio(i18n("User defined")); | 139 | syncPrefsGroup->addRadio(i18n("User defined")); |
139 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 140 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
140 | ++iii; | 141 | ++iii; |
141 | ++iii; | 142 | ++iii; |
142 | QLabel * lab; | 143 | QLabel * lab; |
143 | mUserDateFormatLong = new QLineEdit(topFrame); | 144 | mUserDateFormatLong = new QLineEdit(topFrame); |
144 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 145 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
145 | topLayout->addWidget(lab ,iii,0); | 146 | topLayout->addWidget(lab ,iii,0); |
146 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 147 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
147 | ++iii; | 148 | ++iii; |
148 | mUserDateFormatShort = new QLineEdit(topFrame); | 149 | mUserDateFormatShort = new QLineEdit(topFrame); |
149 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 150 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
150 | topLayout->addWidget(lab ,iii,0); | 151 | topLayout->addWidget(lab ,iii,0); |
151 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 152 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
152 | ++iii; | 153 | ++iii; |
153 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 154 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
154 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 155 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
155 | ++iii; | 156 | ++iii; |
156 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 157 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
157 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 158 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
158 | ++iii; | 159 | ++iii; |
159 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 160 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
160 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 161 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
161 | ++iii; | 162 | ++iii; |
163 | #endif | ||
162 | 164 | ||
163 | } | 165 | } |
164 | 166 | ||
165 | void KOPrefsDialog::setupLocaleTab() | 167 | void KOPrefsDialog::setupLocaleTab() |
166 | { | 168 | { |
169 | #if 0 | ||
167 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 170 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
168 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 171 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
169 | topLayout->setSpacing(spacingHint()); | 172 | topLayout->setSpacing(spacingHint()); |
170 | topLayout->setMargin(marginHint()); | 173 | topLayout->setMargin(marginHint()); |
171 | int iii = 0; | 174 | int iii = 0; |
172 | KPrefsDialogWidRadios *syncPrefsGroup = | 175 | KPrefsDialogWidRadios *syncPrefsGroup = |
173 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 176 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
174 | syncPrefsGroup->addRadio(i18n("English")); | 177 | syncPrefsGroup->addRadio(i18n("English")); |
175 | syncPrefsGroup->addRadio(i18n("German")); | 178 | syncPrefsGroup->addRadio(i18n("German")); |
176 | syncPrefsGroup->addRadio(i18n("French")); | 179 | syncPrefsGroup->addRadio(i18n("French")); |
177 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 180 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
178 | if ( QApplication::desktop()->width() < 300 ) | 181 | if ( QApplication::desktop()->width() < 300 ) |
179 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 182 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
180 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 183 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
181 | ++iii; | 184 | ++iii; |
182 | 185 | ||
183 | syncPrefsGroup = | 186 | syncPrefsGroup = |
184 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 187 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
185 | if ( QApplication::desktop()->width() > 300 ) | 188 | if ( QApplication::desktop()->width() > 300 ) |
186 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 189 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
187 | syncPrefsGroup->addRadio(i18n("24:00")); | 190 | syncPrefsGroup->addRadio(i18n("24:00")); |
188 | syncPrefsGroup->addRadio(i18n("12:00am")); | 191 | syncPrefsGroup->addRadio(i18n("12:00am")); |
189 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 192 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
190 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 193 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
191 | ++iii; | 194 | ++iii; |
192 | KPrefsDialogWidBool *sb; | 195 | KPrefsDialogWidBool *sb; |
193 | if ( QApplication::desktop()->width() < 300 ) { | 196 | if ( QApplication::desktop()->width() < 300 ) { |
194 | sb = | 197 | sb = |
195 | addWidBool(i18n("Week starts on Sunday"), | 198 | addWidBool(i18n("Week starts on Sunday"), |
196 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 199 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
197 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 200 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
198 | ++iii; | 201 | ++iii; |
199 | sb = | 202 | sb = |
200 | addWidBool(i18n("Use short date in (WN/E) view"), | 203 | addWidBool(i18n("Use short date in (WN/E) view"), |
201 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 204 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
202 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 205 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
203 | } | 206 | } |
204 | else { | 207 | else { |
205 | QWidget * hb = new QWidget( topFrame ); | 208 | QWidget * hb = new QWidget( topFrame ); |
206 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 209 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); |
207 | sb = | 210 | sb = |
208 | addWidBool(i18n("Week starts on Sunday"), | 211 | addWidBool(i18n("Week starts on Sunday"), |
209 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 212 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
210 | hbLayout->addWidget(sb->checkBox() ); | 213 | hbLayout->addWidget(sb->checkBox() ); |
211 | sb = | 214 | sb = |
212 | addWidBool(i18n("Use short date in (WN/E) view"), | 215 | addWidBool(i18n("Use short date in (WN/E) view"), |
213 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 216 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
214 | hbLayout->addWidget(sb->checkBox() ); | 217 | hbLayout->addWidget(sb->checkBox() ); |
215 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 218 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
216 | 219 | ||
217 | } | 220 | } |
218 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION | 221 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION |
219 | #if 0 | 222 | #if 0 |
220 | ++iii; | 223 | ++iii; |
221 | sb = | 224 | sb = |
222 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 225 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
223 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 226 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
224 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 227 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
225 | #endif | 228 | #endif |
229 | #endif | ||
226 | } | 230 | } |
227 | void KOPrefsDialog::showSyncPage() | 231 | void KOPrefsDialog::showSyncPage() |
228 | { | 232 | { |
229 | showPage ( 2 ) ; | 233 | showPage ( 2 ) ; |
230 | 234 | ||
231 | } | 235 | } |
232 | void KOPrefsDialog::setupSyncAlgTab() | 236 | void KOPrefsDialog::setupSyncAlgTab() |
233 | { | 237 | { |
234 | #if 0 | 238 | #if 0 |
235 | QLabel * lab; | 239 | QLabel * lab; |
236 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); | 240 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); |
237 | mSetupSyncAlgTab = topFrame; | 241 | mSetupSyncAlgTab = topFrame; |
238 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 242 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
239 | topLayout->setSpacing(spacingHint()); | 243 | topLayout->setSpacing(spacingHint()); |
240 | topLayout->setMargin(marginHint()); | 244 | topLayout->setMargin(marginHint()); |
241 | int iii = 0; | 245 | int iii = 0; |
242 | 246 | ||
243 | KPrefsDialogWidBool *sb = | 247 | KPrefsDialogWidBool *sb = |
244 | addWidBool(i18n("Ask for preferences before syncing"), | 248 | addWidBool(i18n("Ask for preferences before syncing"), |
245 | &(KOPrefs::instance()->mAskForPreferences),topFrame); | 249 | &(KOPrefs::instance()->mAskForPreferences),topFrame); |
246 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 250 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
247 | 251 | ||
248 | ++iii; | 252 | ++iii; |
249 | 253 | ||
250 | KPrefsDialogWidRadios *syncPrefsGroup = | 254 | KPrefsDialogWidRadios *syncPrefsGroup = |
251 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), | 255 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), |
252 | topFrame); | 256 | topFrame); |
253 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 257 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
254 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 258 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
255 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); | 259 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); |
256 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); | 260 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); |
257 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); | 261 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); |
258 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); | 262 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); |
259 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 263 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
260 | ++iii; | 264 | ++iii; |
261 | sb = | 265 | sb = |
262 | addWidBool(i18n("Show summary after syncing"), | 266 | addWidBool(i18n("Show summary after syncing"), |
263 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); | 267 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); |
264 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 268 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
265 | 269 | ||
266 | ++iii; | 270 | ++iii; |
267 | #endif | 271 | #endif |
268 | 272 | ||
269 | 273 | ||
270 | 274 | ||
271 | } | 275 | } |
272 | 276 | ||
273 | 277 | ||
@@ -578,112 +582,97 @@ void KOPrefsDialog::setupViewsTab() | |||
578 | // KPrefsDialogWidTime *dayBegins = | 582 | // KPrefsDialogWidTime *dayBegins = |
579 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 583 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
580 | // topFrame); | 584 | // topFrame); |
581 | // dayBeginsLayout->addWidget(dayBegins->label()); | 585 | // dayBeginsLayout->addWidget(dayBegins->label()); |
582 | // dayBeginsLayout->addStretch(1); | 586 | // dayBeginsLayout->addStretch(1); |
583 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); | 587 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); |
584 | 588 | ||
585 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; | 589 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; |
586 | // topLayout->addLayout(nextDaysLayout,1,0); | 590 | // topLayout->addLayout(nextDaysLayout,1,0); |
587 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); | 591 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); |
588 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); | 592 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); |
589 | // nextDaysLayout->addStretch(1); | 593 | // nextDaysLayout->addStretch(1); |
590 | // nextDaysLayout->addWidget(mNextXDaysSpin); | 594 | // nextDaysLayout->addWidget(mNextXDaysSpin); |
591 | 595 | ||
592 | 596 | ||
593 | int ii = 0; | 597 | int ii = 0; |
594 | KPrefsDialogWidBool *dummy = | 598 | KPrefsDialogWidBool *dummy = |
595 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), | 599 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), |
596 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); | 600 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); |
597 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 601 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
598 | 602 | ||
599 | dummy = | 603 | dummy = |
600 | addWidBool(i18n("Highlight current day in agenda"), | 604 | addWidBool(i18n("Highlight current day in agenda"), |
601 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); | 605 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); |
602 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 606 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
603 | 607 | ||
604 | dummy = | 608 | dummy = |
605 | addWidBool(i18n("Use light color for highlight current day"), | 609 | addWidBool(i18n("Use light color for highlight current day"), |
606 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); | 610 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); |
607 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 611 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
608 | 612 | ||
609 | KPrefsDialogWidBool *dailyRecur = | 613 | KPrefsDialogWidBool *dailyRecur = |
610 | addWidBool(i18n("Show events that recur daily in date nav."), | 614 | addWidBool(i18n("Show events that recur daily in date nav."), |
611 | &(KOPrefs::instance()->mDailyRecur),topFrame); | 615 | &(KOPrefs::instance()->mDailyRecur),topFrame); |
612 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 616 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
613 | 617 | ||
614 | KPrefsDialogWidBool *weeklyRecur = | 618 | KPrefsDialogWidBool *weeklyRecur = |
615 | addWidBool(i18n("Show ev. that recur weekly in date nav."), | 619 | addWidBool(i18n("Show ev. that recur weekly in date nav."), |
616 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); | 620 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); |
617 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); | 621 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); |
618 | if ( QApplication::desktop()->width() > 640 ) { | 622 | if ( QApplication::desktop()->width() > 640 ) { |
619 | 623 | ||
620 | KPrefsDialogWidBool *enableToolTips = | 624 | KPrefsDialogWidBool *enableToolTips = |
621 | addWidBool(i18n("Enable tooltips displaying summary of ev."), | 625 | addWidBool(i18n("Enable tooltips displaying summary of ev."), |
622 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | 626 | &(KOPrefs::instance()->mEnableToolTips),topFrame); |
623 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | 627 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); |
624 | 628 | ||
625 | } | 629 | } |
626 | KPrefsDialogWidBool *passwdk = | 630 | |
627 | addWidBool(i18n("Show parent To-Do's in What's Next view"), | ||
628 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | ||
629 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | ||
630 | |||
631 | passwdk = | ||
632 | addWidBool(i18n("Show location in What's Next view"), | ||
633 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | ||
634 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | ||
635 | |||
636 | passwdk = | ||
637 | addWidBool(i18n("Show Sync Events in WN/Agenda view"), | ||
638 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | ||
639 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | ||
640 | |||
641 | |||
642 | KPrefsDialogWidBool *marcusBainsEnabled = | 631 | KPrefsDialogWidBool *marcusBainsEnabled = |
643 | addWidBool(i18n("Show Marcus Bains line"), | 632 | addWidBool(i18n("Show Marcus Bains line"), |
644 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); | 633 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); |
645 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); | 634 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); |
646 | 635 | ||
647 | 636 | ||
648 | // topLayout->addWidget(hourSizeGroup,ii++,0); | 637 | // topLayout->addWidget(hourSizeGroup,ii++,0); |
649 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); | 638 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); |
650 | //topLayout->setRowStretch(11,1); | 639 | //topLayout->setRowStretch(11,1); |
651 | 640 | ||
652 | 641 | ||
653 | 642 | ||
654 | 643 | ||
655 | 644 | ||
656 | 645 | ||
657 | topFrame = addPage(i18n("ViewChange"),0,0); | 646 | topFrame = addPage(i18n("ViewChange"),0,0); |
658 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 647 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
659 | 648 | ||
660 | topLayout = new QGridLayout(topFrame,6,1); | 649 | topLayout = new QGridLayout(topFrame,6,1); |
661 | topLayout->setSpacing(spacingHint()); | 650 | topLayout->setSpacing(spacingHint()); |
662 | topLayout->setMargin(marginHint()); | 651 | topLayout->setMargin(marginHint()); |
663 | ii = 0; | 652 | ii = 0; |
664 | 653 | ||
665 | 654 | ||
666 | dummy = | 655 | dummy = |
667 | addWidBool(i18n("Hold fullscreen on view change"), | 656 | addWidBool(i18n("Hold fullscreen on view change"), |
668 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); | 657 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); |
669 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 658 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
670 | 659 | ||
671 | dummy = | 660 | dummy = |
672 | addWidBool(i18n("Hold non-fullscreen on view change"), | 661 | addWidBool(i18n("Hold non-fullscreen on view change"), |
673 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); | 662 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); |
674 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 663 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
675 | 664 | ||
676 | 665 | ||
677 | KPrefsDialogWidBool *fullViewTodo = | 666 | KPrefsDialogWidBool *fullViewTodo = |
678 | addWidBool(i18n("Event list view uses full window"), | 667 | addWidBool(i18n("Event list view uses full window"), |
679 | &(KOPrefs::instance()->mFullViewTodo),topFrame); | 668 | &(KOPrefs::instance()->mFullViewTodo),topFrame); |
680 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); | 669 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); |
681 | 670 | ||
682 | KPrefsDialogWidBool *fullViewMonth = | 671 | KPrefsDialogWidBool *fullViewMonth = |
683 | addWidBool(i18n("Next days view uses full window"), | 672 | addWidBool(i18n("Next days view uses full window"), |
684 | &(KOPrefs::instance()->mFullViewMonth),topFrame); | 673 | &(KOPrefs::instance()->mFullViewMonth),topFrame); |
685 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); | 674 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); |
686 | 675 | ||
687 | dummy = | 676 | dummy = |
688 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), | 677 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), |
689 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); | 678 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); |
@@ -754,97 +743,123 @@ void KOPrefsDialog::setupViewsTab() | |||
754 | &(KOPrefs::instance()->mMonthShowIcons),habo); | 743 | &(KOPrefs::instance()->mMonthShowIcons),habo); |
755 | 744 | ||
756 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 745 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
757 | ii++; | 746 | ii++; |
758 | #ifdef DESKTOP_VERSION | 747 | #ifdef DESKTOP_VERSION |
759 | KPrefsDialogWidBool *enableMonthScroll = | 748 | KPrefsDialogWidBool *enableMonthScroll = |
760 | addWidBool(i18n("Enable scrollbars in month view cells"), | 749 | addWidBool(i18n("Enable scrollbars in month view cells"), |
761 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); | 750 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); |
762 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); | 751 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); |
763 | #endif | 752 | #endif |
764 | 753 | ||
765 | dummy = | 754 | dummy = |
766 | addWidBool(i18n("Show Sat/Sun together"), | 755 | addWidBool(i18n("Show Sat/Sun together"), |
767 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); | 756 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); |
768 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 757 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
769 | 758 | ||
770 | KPrefsDialogWidBool *coloredCategoriesInMonthView = | 759 | KPrefsDialogWidBool *coloredCategoriesInMonthView = |
771 | addWidBool(i18n("Month view uses category colors"), | 760 | addWidBool(i18n("Month view uses category colors"), |
772 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); | 761 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); |
773 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 762 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
774 | 763 | ||
775 | dummy = | 764 | dummy = |
776 | addWidBool(i18n("Categorie colors are applied to text"), | 765 | addWidBool(i18n("Categorie colors are applied to text"), |
777 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); | 766 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); |
778 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 767 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
779 | coloredCategoriesInMonthView = | 768 | coloredCategoriesInMonthView = |
780 | addWidBool(i18n("Month view uses day colors"), | 769 | addWidBool(i18n("Month view uses day colors"), |
781 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); | 770 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); |
782 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 771 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
783 | 772 | ||
784 | KPrefsDialogWidColor *holidayColor = | 773 | KPrefsDialogWidColor *holidayColor = |
785 | addWidColor(i18n("Day color odd months"), | 774 | addWidColor(i18n("Day color odd months"), |
786 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); | 775 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); |
787 | topLayout->addWidget(holidayColor->label(),ii,0); | 776 | topLayout->addWidget(holidayColor->label(),ii,0); |
788 | topLayout->addWidget(holidayColor->button(),ii++,1); | 777 | topLayout->addWidget(holidayColor->button(),ii++,1); |
789 | 778 | ||
790 | holidayColor = | 779 | holidayColor = |
791 | addWidColor(i18n("Day color even months"), | 780 | addWidColor(i18n("Day color even months"), |
792 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); | 781 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); |
793 | topLayout->addWidget(holidayColor->label(),ii,0); | 782 | topLayout->addWidget(holidayColor->label(),ii,0); |
794 | topLayout->addWidget(holidayColor->button(),ii++,1); | 783 | topLayout->addWidget(holidayColor->button(),ii++,1); |
795 | 784 | ||
796 | 785 | ||
797 | holidayColor = | 786 | holidayColor = |
798 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 787 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
799 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); | 788 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); |
800 | topLayout->addWidget(holidayColor->label(),ii,0); | 789 | topLayout->addWidget(holidayColor->label(),ii,0); |
801 | topLayout->addWidget(holidayColor->button(),ii++,1); | 790 | topLayout->addWidget(holidayColor->button(),ii++,1); |
802 | 791 | // *********************** What'sNext View | |
792 | topFrame = addPage(i18n("What's Next View"),0,0); | ||
793 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | ||
794 | |||
795 | topLayout = new QGridLayout(topFrame,4,1); | ||
796 | topLayout->setSpacing(spacingHint()); | ||
797 | topLayout->setMargin(marginHint()); | ||
798 | ii = 0; | ||
799 | KPrefsDialogWidBool *passwdk = | ||
800 | addWidBool(i18n("Show parent To-Do's in What's Next view"), | ||
801 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | ||
802 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | ||
803 | |||
804 | passwdk = | ||
805 | addWidBool(i18n("Show location in What's Next view"), | ||
806 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | ||
807 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | ||
808 | |||
809 | passwdk = | ||
810 | addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), | ||
811 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | ||
812 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | ||
813 | passwdk = | ||
814 | addWidBool(i18n("Use short date in \nWhat's Next/Event view"), | ||
815 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | ||
816 | topLayout->addMultiCellWidget(passwdk->checkBox(), ii,ii,0,1); | ||
817 | |||
803 | // *********************** Todo View | 818 | // *********************** Todo View |
804 | 819 | ||
805 | topFrame = addPage(i18n("Todo View"),0,0); | 820 | topFrame = addPage(i18n("Todo View"),0,0); |
806 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 821 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
807 | 822 | ||
808 | topLayout = new QGridLayout(topFrame,4,1); | 823 | topLayout = new QGridLayout(topFrame,4,1); |
809 | topLayout->setSpacing(spacingHint()); | 824 | topLayout->setSpacing(spacingHint()); |
810 | topLayout->setMargin(marginHint()); | 825 | topLayout->setMargin(marginHint()); |
811 | ii = 0; | 826 | ii = 0; |
812 | 827 | ||
813 | KPrefsDialogWidBool *showCompletedTodo = | 828 | KPrefsDialogWidBool *showCompletedTodo = |
814 | addWidBool(i18n("To-do view shows completed Todos"), | 829 | addWidBool(i18n("To-do view shows completed Todos"), |
815 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); | 830 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); |
816 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); | 831 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); |
817 | dummy = | 832 | dummy = |
818 | addWidBool(i18n("To-do view shows complete as 'xx %'"), | 833 | addWidBool(i18n("To-do view shows complete as 'xx %'"), |
819 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); | 834 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); |
820 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 835 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
821 | 836 | ||
822 | dummy = | 837 | dummy = |
823 | addWidBool(i18n("Small To-do view uses smaller font"), | 838 | addWidBool(i18n("Small To-do view uses smaller font"), |
824 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); | 839 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); |
825 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 840 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
826 | 841 | ||
827 | 842 | ||
828 | 843 | ||
829 | dummy = | 844 | dummy = |
830 | addWidBool(i18n("Todo view uses category colors"), | 845 | addWidBool(i18n("Todo view uses category colors"), |
831 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); | 846 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); |
832 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 847 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
833 | 848 | ||
834 | 849 | ||
835 | QWidget* wid = new QWidget( topFrame ); | 850 | QWidget* wid = new QWidget( topFrame ); |
836 | // Todo due today color | 851 | // Todo due today color |
837 | KPrefsDialogWidColor *todoDueTodayColor = | 852 | KPrefsDialogWidColor *todoDueTodayColor = |
838 | addWidColor(i18n("Todo due today color:"), | 853 | addWidColor(i18n("Todo due today color:"), |
839 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 854 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
840 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 855 | QHBoxLayout *widLayout = new QHBoxLayout(wid); |
841 | widLayout->addWidget( todoDueTodayColor->label() ); | 856 | widLayout->addWidget( todoDueTodayColor->label() ); |
842 | widLayout->addWidget( todoDueTodayColor->button() ); | 857 | widLayout->addWidget( todoDueTodayColor->button() ); |
843 | topLayout->addWidget(wid,ii++,0); | 858 | topLayout->addWidget(wid,ii++,0); |
844 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); | 859 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); |
845 | 860 | ||
846 | // Todo overdue color | 861 | // Todo overdue color |
847 | wid = new QWidget( topFrame ); | 862 | wid = new QWidget( topFrame ); |
848 | widLayout = new QHBoxLayout(wid); | 863 | widLayout = new QHBoxLayout(wid); |
849 | KPrefsDialogWidColor *todoOverdueColor = | 864 | KPrefsDialogWidColor *todoOverdueColor = |
850 | addWidColor(i18n("Todo overdue color:"), | 865 | addWidColor(i18n("Todo overdue color:"), |
@@ -1291,170 +1306,170 @@ void KOPrefsDialog::setupGroupAutomationTab() | |||
1291 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); | 1306 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); |
1292 | 1307 | ||
1293 | KPrefsDialogWidRadios *autoFreeBusyGroup = | 1308 | KPrefsDialogWidRadios *autoFreeBusyGroup = |
1294 | addWidRadios(i18n("Auto Send FreeBusy Information"), | 1309 | addWidRadios(i18n("Auto Send FreeBusy Information"), |
1295 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); | 1310 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); |
1296 | autoFreeBusyGroup->addRadio(i18n("Never")); | 1311 | autoFreeBusyGroup->addRadio(i18n("Never")); |
1297 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); | 1312 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); |
1298 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1313 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1299 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); | 1314 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); |
1300 | 1315 | ||
1301 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = | 1316 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = |
1302 | addWidRadios(i18n("Auto Save FreeBusy Replies"), | 1317 | addWidRadios(i18n("Auto Save FreeBusy Replies"), |
1303 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); | 1318 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); |
1304 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); | 1319 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); |
1305 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); | 1320 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); |
1306 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1321 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1307 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); | 1322 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); |
1308 | } | 1323 | } |
1309 | 1324 | ||
1310 | void KOPrefsDialog::showPrinterTab() | 1325 | void KOPrefsDialog::showPrinterTab() |
1311 | { | 1326 | { |
1312 | showPage(pageIndex(mPrinterTab)); | 1327 | showPage(pageIndex(mPrinterTab)); |
1313 | } | 1328 | } |
1314 | 1329 | ||
1315 | 1330 | ||
1316 | void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, | 1331 | void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, |
1317 | const QStringList *tags) | 1332 | const QStringList *tags) |
1318 | { | 1333 | { |
1319 | if (tags) { | 1334 | if (tags) { |
1320 | int i = tags->findIndex(text); | 1335 | int i = tags->findIndex(text); |
1321 | if (i > 0) combo->setCurrentItem(i); | 1336 | if (i > 0) combo->setCurrentItem(i); |
1322 | } else { | 1337 | } else { |
1323 | for(int i=0;i<combo->count();++i) { | 1338 | for(int i=0;i<combo->count();++i) { |
1324 | if (combo->text(i) == text) { | 1339 | if (combo->text(i) == text) { |
1325 | combo->setCurrentItem(i); | 1340 | combo->setCurrentItem(i); |
1326 | break; | 1341 | break; |
1327 | } | 1342 | } |
1328 | } | 1343 | } |
1329 | } | 1344 | } |
1330 | } | 1345 | } |
1331 | 1346 | ||
1332 | void KOPrefsDialog::usrReadConfig() | 1347 | void KOPrefsDialog::usrReadConfig() |
1333 | { | 1348 | { |
1334 | kdelibcfg->readConfig(); | 1349 | kdelibcfg->readConfig(); |
1335 | mNameEdit->setText(KOPrefs::instance()->fullName()); | 1350 | mNameEdit->setText(KOPrefs::instance()->fullName()); |
1336 | mEmailEdit->setText(KOPrefs::instance()->email()); | 1351 | mEmailEdit->setText(KOPrefs::instance()->email()); |
1337 | 1352 | ||
1338 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); | 1353 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); |
1339 | QDate current ( 2001, 1,1); | 1354 | // QDate current ( 2001, 1,1); |
1340 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); | 1355 | //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); |
1341 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); | 1356 | //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); |
1342 | setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); | 1357 | //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); |
1343 | //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); | 1358 | //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); |
1344 | mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); | 1359 | mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); |
1345 | mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); | 1360 | mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); |
1346 | mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); | 1361 | mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); |
1347 | // if (KOPrefs::instance()->mAllDaySize > 47 ) | 1362 | // if (KOPrefs::instance()->mAllDaySize > 47 ) |
1348 | // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; | 1363 | // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; |
1349 | //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); | 1364 | //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); |
1350 | 1365 | ||
1351 | mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); | 1366 | mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); |
1352 | mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); | 1367 | mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); |
1353 | mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); | 1368 | mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); |
1354 | // mAMails->clear(); | 1369 | // mAMails->clear(); |
1355 | // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); | 1370 | // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); |
1356 | // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { | 1371 | // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { |
1357 | // QListViewItem *item = new QListViewItem(mAMails); | 1372 | // QListViewItem *item = new QListViewItem(mAMails); |
1358 | // item->setText(0,*it); | 1373 | // item->setText(0,*it); |
1359 | // mAMails->insertItem(item); | 1374 | // mAMails->insertItem(item); |
1360 | // } | 1375 | // } |
1361 | 1376 | ||
1362 | // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); | 1377 | // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); |
1363 | //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); | 1378 | //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); |
1364 | //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); | 1379 | //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); |
1365 | //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); | 1380 | //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); |
1366 | 1381 | ||
1367 | //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); | 1382 | //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); |
1368 | mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); | 1383 | mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); |
1369 | QString dummy = KOPrefs::instance()->mUserDateFormatLong; | 1384 | //QString dummy = KOPrefs::instance()->mUserDateFormatLong; |
1370 | mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); | 1385 | //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); |
1371 | dummy = KOPrefs::instance()->mUserDateFormatShort; | 1386 | //dummy = KOPrefs::instance()->mUserDateFormatShort; |
1372 | mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); | 1387 | //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); |
1373 | updateCategories(); | 1388 | updateCategories(); |
1374 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); | 1389 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); |
1375 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); | 1390 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); |
1376 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); | 1391 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); |
1377 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); | 1392 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); |
1378 | } | 1393 | } |
1379 | 1394 | ||
1380 | 1395 | ||
1381 | void KOPrefsDialog::usrWriteConfig() | 1396 | void KOPrefsDialog::usrWriteConfig() |
1382 | { | 1397 | { |
1383 | 1398 | ||
1384 | kdelibcfg->writeConfig(); | 1399 | kdelibcfg->writeConfig(); |
1385 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); | 1400 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); |
1386 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); | 1401 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); |
1387 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); | 1402 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); |
1388 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); | 1403 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); |
1389 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); | 1404 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); |
1390 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); | 1405 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); |
1391 | 1406 | ||
1392 | KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); | 1407 | //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); |
1393 | KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); | 1408 | //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); |
1394 | KOPrefs::instance()->setFullName(mNameEdit->text()); | 1409 | KOPrefs::instance()->setFullName(mNameEdit->text()); |
1395 | KOPrefs::instance()->setEmail(mEmailEdit->text()); | 1410 | KOPrefs::instance()->setEmail(mEmailEdit->text()); |
1396 | 1411 | ||
1397 | KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); | 1412 | KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); |
1398 | 1413 | ||
1399 | KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); | 1414 | // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); |
1400 | QDate date; | 1415 | //QDate date; |
1401 | date = mStartDateSavingEdit->date(); | 1416 | //date = mStartDateSavingEdit->date(); |
1402 | int sub = 0; | 1417 | //int sub = 0; |
1403 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 1418 | //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
1404 | sub = 1; | 1419 | // sub = 1; |
1405 | KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; | 1420 | // KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; |
1406 | date = mEndDateSavingEdit->date(); | 1421 | // date = mEndDateSavingEdit->date(); |
1407 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 1422 | // if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
1408 | sub = 1; | 1423 | // sub = 1; |
1409 | else | 1424 | // else |
1410 | sub = 0; | 1425 | // sub = 0; |
1411 | KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; | 1426 | // KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; |
1412 | // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); | 1427 | // // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); |
1413 | 1428 | ||
1414 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); | 1429 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); |
1415 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); | 1430 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); |
1416 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); | 1431 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); |
1417 | 1432 | ||
1418 | //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); | 1433 | //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); |
1419 | 1434 | ||
1420 | QDictIterator<QColor> it(mCategoryDict); | 1435 | QDictIterator<QColor> it(mCategoryDict); |
1421 | while (it.current()) { | 1436 | while (it.current()) { |
1422 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); | 1437 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); |
1423 | ++it; | 1438 | ++it; |
1424 | } | 1439 | } |
1425 | 1440 | ||
1426 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); | 1441 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); |
1427 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); | 1442 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); |
1428 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); | 1443 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); |
1429 | 1444 | ||
1430 | KOPrefs::instance()->mAdditionalMails.clear(); | 1445 | KOPrefs::instance()->mAdditionalMails.clear(); |
1431 | // QListViewItem *item; | 1446 | // QListViewItem *item; |
1432 | // item = mAMails->firstChild(); | 1447 | // item = mAMails->firstChild(); |
1433 | // while (item) | 1448 | // while (item) |
1434 | // { | 1449 | // { |
1435 | // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); | 1450 | // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); |
1436 | // item = item->nextSibling(); | 1451 | // item = item->nextSibling(); |
1437 | // } | 1452 | // } |
1438 | KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); | 1453 | KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); |
1439 | KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; | 1454 | KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; |
1440 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; | 1455 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; |
1441 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; | 1456 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; |
1442 | 1457 | ||
1443 | } | 1458 | } |
1444 | 1459 | ||
1445 | void KOPrefsDialog::updateCategories() | 1460 | void KOPrefsDialog::updateCategories() |
1446 | { | 1461 | { |
1447 | mCategoryCombo->clear(); | 1462 | mCategoryCombo->clear(); |
1448 | mCategoryDict.clear(); | 1463 | mCategoryDict.clear(); |
1449 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1464 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1450 | updateCategoryColor(); | 1465 | updateCategoryColor(); |
1451 | } | 1466 | } |
1452 | 1467 | ||
1453 | void KOPrefsDialog::warningGroupScheduling() | 1468 | void KOPrefsDialog::warningGroupScheduling() |
1454 | { | 1469 | { |
1455 | warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); | 1470 | warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); |
1456 | } | 1471 | } |
1457 | 1472 | ||
1458 | void KOPrefsDialog::warningProjectView() | 1473 | void KOPrefsDialog::warningProjectView() |
1459 | { | 1474 | { |
1460 | warningExperimental(mEnableProjectView->checkBox()->isChecked()); | 1475 | warningExperimental(mEnableProjectView->checkBox()->isChecked()); |
@@ -1512,110 +1527,111 @@ void KOPrefsDialog::removeItem() | |||
1512 | // aEmailsEdit->setText(""); | 1527 | // aEmailsEdit->setText(""); |
1513 | // aEmailsEdit->setEnabled(false); | 1528 | // aEmailsEdit->setEnabled(false); |
1514 | // } | 1529 | // } |
1515 | // if (mAMails->childCount() == 0) { | 1530 | // if (mAMails->childCount() == 0) { |
1516 | // aEmailsEdit->setEnabled(false); | 1531 | // aEmailsEdit->setEnabled(false); |
1517 | // } | 1532 | // } |
1518 | } | 1533 | } |
1519 | 1534 | ||
1520 | void KOPrefsDialog::updateItem() | 1535 | void KOPrefsDialog::updateItem() |
1521 | { | 1536 | { |
1522 | // QListViewItem *item; | 1537 | // QListViewItem *item; |
1523 | // item = mAMails->selectedItem(); | 1538 | // item = mAMails->selectedItem(); |
1524 | // if (!item) return; | 1539 | // if (!item) return; |
1525 | // item->setText(0,aEmailsEdit->text()); | 1540 | // item->setText(0,aEmailsEdit->text()); |
1526 | } | 1541 | } |
1527 | 1542 | ||
1528 | void KOPrefsDialog::updateInput() | 1543 | void KOPrefsDialog::updateInput() |
1529 | { | 1544 | { |
1530 | // QListViewItem *item; | 1545 | // QListViewItem *item; |
1531 | // item = mAMails->selectedItem(); | 1546 | // item = mAMails->selectedItem(); |
1532 | // if (!item) return; | 1547 | // if (!item) return; |
1533 | // aEmailsEdit->setEnabled(true); | 1548 | // aEmailsEdit->setEnabled(true); |
1534 | // aEmailsEdit->setText(item->text(0)); | 1549 | // aEmailsEdit->setText(item->text(0)); |
1535 | } | 1550 | } |
1536 | void KOPrefsDialog::updateTimezoneOffset( int index ) | 1551 | void KOPrefsDialog::updateTimezoneOffset( int index ) |
1537 | { | 1552 | { |
1538 | /* | 1553 | /* |
1539 | qDebug("updateTimezoneOffset %d ", index); | 1554 | qDebug("updateTimezoneOffset %d ", index); |
1540 | if ( index < 24 ) { | 1555 | if ( index < 24 ) { |
1541 | mTimezoneOffsetSpin->setEnabled ( false ); | 1556 | mTimezoneOffsetSpin->setEnabled ( false ); |
1542 | mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); | 1557 | mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); |
1543 | 1558 | ||
1544 | 1559 | ||
1545 | } else { | 1560 | } else { |
1546 | if ( index == 24 ) { | 1561 | if ( index == 24 ) { |
1547 | mTimezoneOffsetSpin->setEnabled ( true ); | 1562 | mTimezoneOffsetSpin->setEnabled ( true ); |
1548 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); | 1563 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); |
1549 | 1564 | ||
1550 | } else { | 1565 | } else { |
1551 | mTimezoneOffsetSpin->setEnabled ( false ); | 1566 | mTimezoneOffsetSpin->setEnabled ( false ); |
1552 | mTimezoneOffsetSpin->setValue( 0 ); | 1567 | mTimezoneOffsetSpin->setValue( 0 ); |
1553 | } | 1568 | } |
1554 | } | 1569 | } |
1555 | */ | 1570 | */ |
1556 | } | 1571 | } |
1557 | 1572 | ||
1558 | void KOPrefsDialog::setupTimeZoneTab() | 1573 | void KOPrefsDialog::setupTimeZoneTab() |
1559 | { | 1574 | { |
1575 | #if 0 | ||
1560 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); | 1576 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); |
1561 | // DesktopIcon("clock",KIcon::SizeMedium)); | 1577 | // DesktopIcon("clock",KIcon::SizeMedium)); |
1562 | 1578 | ||
1563 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1579 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1564 | topLayout->setSpacing(spacingHint()); | 1580 | topLayout->setSpacing(spacingHint()); |
1565 | topLayout->setMargin(marginHint()); | 1581 | topLayout->setMargin(marginHint()); |
1566 | 1582 | ||
1567 | QHBox *timeZoneBox = new QHBox( topFrame ); | 1583 | QHBox *timeZoneBox = new QHBox( topFrame ); |
1568 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 1584 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
1569 | 1585 | ||
1570 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 1586 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
1571 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 1587 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
1572 | if ( QApplication::desktop()->width() < 300 ) { | 1588 | if ( QApplication::desktop()->width() < 300 ) { |
1573 | mTimeZoneCombo->setMaximumWidth(150); | 1589 | mTimeZoneCombo->setMaximumWidth(150); |
1574 | } | 1590 | } |
1575 | 1591 | ||
1576 | QStringList list; | 1592 | QStringList list; |
1577 | list = KGlobal::locale()->timeZoneList(); | 1593 | list = KGlobal::locale()->timeZoneList(); |
1578 | mTimeZoneCombo->insertStringList(list); | 1594 | mTimeZoneCombo->insertStringList(list); |
1579 | 1595 | ||
1580 | // find the currently set time zone and select it | 1596 | // find the currently set time zone and select it |
1581 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; | 1597 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; |
1582 | int nCurrentlySet = 11; | 1598 | int nCurrentlySet = 11; |
1583 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 1599 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |
1584 | { | 1600 | { |
1585 | if (mTimeZoneCombo->text(i) == sCurrentlySet) | 1601 | if (mTimeZoneCombo->text(i) == sCurrentlySet) |
1586 | { | 1602 | { |
1587 | nCurrentlySet = i; | 1603 | nCurrentlySet = i; |
1588 | break; | 1604 | break; |
1589 | } | 1605 | } |
1590 | } | 1606 | } |
1591 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); | 1607 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); |
1592 | int iii = 1; | 1608 | int iii = 1; |
1593 | KPrefsDialogWidBool *sb = | 1609 | KPrefsDialogWidBool *sb = |
1594 | addWidBool(i18n("Timezone has daylight saving"), | 1610 | addWidBool(i18n("Timezone has daylight saving"), |
1595 | &(KOPrefs::instance()->mUseDaylightsaving),topFrame); | 1611 | &(KOPrefs::instance()->mUseDaylightsaving),topFrame); |
1596 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 1612 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
1597 | ++iii; | 1613 | ++iii; |
1598 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 1614 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); |
1599 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 1615 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
1600 | ++iii; | 1616 | ++iii; |
1601 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 1617 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
1602 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 1618 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
1603 | ++iii; | 1619 | ++iii; |
1604 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 1620 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |
1605 | topLayout->addWidget(lab, iii,0); | 1621 | topLayout->addWidget(lab, iii,0); |
1606 | mStartDateSavingEdit = new KDateEdit(topFrame); | 1622 | mStartDateSavingEdit = new KDateEdit(topFrame); |
1607 | topLayout->addWidget(mStartDateSavingEdit, iii,1); | 1623 | topLayout->addWidget(mStartDateSavingEdit, iii,1); |
1608 | ++iii; | 1624 | ++iii; |
1609 | 1625 | ||
1610 | lab = new QLabel( i18n("Daylight end:"), topFrame ); | 1626 | lab = new QLabel( i18n("Daylight end:"), topFrame ); |
1611 | topLayout->addWidget(lab, iii,0); | 1627 | topLayout->addWidget(lab, iii,0); |
1612 | mEndDateSavingEdit = new KDateEdit(topFrame); | 1628 | mEndDateSavingEdit = new KDateEdit(topFrame); |
1613 | topLayout->addWidget(mEndDateSavingEdit, iii,1); | 1629 | topLayout->addWidget(mEndDateSavingEdit, iii,1); |
1614 | ++iii; | 1630 | ++iii; |
1615 | QDate current ( 2001, 1,1); | 1631 | QDate current ( 2001, 1,1); |
1616 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); | 1632 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); |
1617 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); | 1633 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); |
1618 | 1634 | #endif | |
1619 | 1635 | ||
1620 | } | 1636 | } |
1621 | 1637 | ||