author | alwin <alwin> | 2005-03-12 18:25:40 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-12 18:25:40 (UTC) |
commit | 9dddeb81d7db5da718f3f467bb1511b7e72b9caa (patch) (unidiff) | |
tree | 4ebb3ca0a3c13d5c6229429a530480e0737a1713 | |
parent | f195cfb8a11a0b5ef6fd397cc835af59b4266c8c (diff) | |
download | opie-9dddeb81d7db5da718f3f467bb1511b7e72b9caa.zip opie-9dddeb81d7db5da718f3f467bb1511b7e72b9caa.tar.gz opie-9dddeb81d7db5da718f3f467bb1511b7e72b9caa.tar.bz2 |
check range for aplett timeout
-rw-r--r-- | noncore/net/mail/settingsdialog.cpp | 4 | ||||
-rw-r--r-- | noncore/net/mail/settingsdialogui.ui | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/noncore/net/mail/settingsdialog.cpp b/noncore/net/mail/settingsdialog.cpp index 061ea72..6441948 100644 --- a/noncore/net/mail/settingsdialog.cpp +++ b/noncore/net/mail/settingsdialog.cpp | |||
@@ -1,49 +1,51 @@ | |||
1 | #include <qcheckbox.h> | 1 | #include <qcheckbox.h> |
2 | #include <qspinbox.h> | 2 | #include <qspinbox.h> |
3 | 3 | ||
4 | #include <qpe/config.h> | 4 | #include <qpe/config.h> |
5 | 5 | ||
6 | #include "settingsdialog.h" | 6 | #include "settingsdialog.h" |
7 | 7 | ||
8 | 8 | ||
9 | SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) | 9 | SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) |
10 | : SettingsDialogUI( parent, name, modal, fl ) { | 10 | : SettingsDialogUI( parent, name, modal, fl ) { |
11 | 11 | ||
12 | readConfig(); | 12 | readConfig(); |
13 | } | 13 | } |
14 | 14 | ||
15 | SettingsDialog::~SettingsDialog() { | 15 | SettingsDialog::~SettingsDialog() { |
16 | 16 | ||
17 | } | 17 | } |
18 | 18 | ||
19 | void SettingsDialog::readConfig() { | 19 | void SettingsDialog::readConfig() { |
20 | Config cfg("mail"); | 20 | Config cfg("mail"); |
21 | cfg.setGroup( "Settings" ); | 21 | cfg.setGroup( "Settings" ); |
22 | showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) ); | 22 | showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) ); |
23 | cfg.setGroup( "Compose" ); | 23 | cfg.setGroup( "Compose" ); |
24 | checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); | 24 | checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); |
25 | cfg.setGroup( "Applet" ); | 25 | cfg.setGroup( "Applet" ); |
26 | cbEnableTaskbarApplet->setChecked( cfg.readBoolEntry( "Disabled", false ) ); | 26 | cbEnableTaskbarApplet->setChecked( cfg.readBoolEntry( "Disabled", false ) ); |
27 | spCheckOften->setValue( cfg.readNumEntry( "CheckEvery", 5 ) ); | 27 | spCheckOften->setValue( cfg.readNumEntry( "CheckEvery", 5 ) ); |
28 | cbBlinkLed->setChecked( cfg.readBoolEntry( "BlinkLed", true ) ); | 28 | cbBlinkLed->setChecked( cfg.readBoolEntry( "BlinkLed", true ) ); |
29 | cbPlaySound->setChecked( cfg.readBoolEntry( "PlaySound", false ) ); | 29 | cbPlaySound->setChecked( cfg.readBoolEntry( "PlaySound", false ) ); |
30 | 30 | ||
31 | } | 31 | } |
32 | 32 | ||
33 | void SettingsDialog::writeConfig() { | 33 | void SettingsDialog::writeConfig() { |
34 | Config cfg( "mail" ); | 34 | Config cfg( "mail" ); |
35 | cfg.setGroup( "Settings" ); | 35 | cfg.setGroup( "Settings" ); |
36 | cfg.writeEntry( "showHtml", showHtmlButton->isChecked() ); | 36 | cfg.writeEntry( "showHtml", showHtmlButton->isChecked() ); |
37 | cfg.setGroup( "Compose" ); | 37 | cfg.setGroup( "Compose" ); |
38 | cfg.writeEntry( "sendLater", checkBoxLater->isChecked() ); | 38 | cfg.writeEntry( "sendLater", checkBoxLater->isChecked() ); |
39 | cfg.setGroup( "Applet" ); | 39 | cfg.setGroup( "Applet" ); |
40 | cfg.writeEntry( "Disabled", cbEnableTaskbarApplet->isChecked() ); | 40 | cfg.writeEntry( "Disabled", cbEnableTaskbarApplet->isChecked() ); |
41 | cfg.writeEntry( "CheckEvery", spCheckOften->value() ); | 41 | int check = spCheckOften->value(); |
42 | if (check<1)check=1;if (check>99)check=99; | ||
43 | cfg.writeEntry( "CheckEvery", check); | ||
42 | cfg.writeEntry( "BlinkLed", cbBlinkLed->isChecked() ); | 44 | cfg.writeEntry( "BlinkLed", cbBlinkLed->isChecked() ); |
43 | cfg.writeEntry( "PlaySound", cbPlaySound->isChecked() ); | 45 | cfg.writeEntry( "PlaySound", cbPlaySound->isChecked() ); |
44 | } | 46 | } |
45 | 47 | ||
46 | void SettingsDialog::accept() { | 48 | void SettingsDialog::accept() { |
47 | writeConfig(); | 49 | writeConfig(); |
48 | QDialog::accept(); | 50 | QDialog::accept(); |
49 | } | 51 | } |
diff --git a/noncore/net/mail/settingsdialogui.ui b/noncore/net/mail/settingsdialogui.ui index 13b8e05..4acd84a 100644 --- a/noncore/net/mail/settingsdialogui.ui +++ b/noncore/net/mail/settingsdialogui.ui | |||
@@ -1,78 +1,78 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>SettingsDialogUI</class> | 2 | <class>SettingsDialogUI</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QDialog</class> | 4 | <class>QDialog</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>SettingsDialogUI</cstring> | 7 | <cstring>SettingsDialogUI</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>316</width> | 14 | <width>312</width> |
15 | <height>379</height> | 15 | <height>379</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>Settings Dialog</string> | 20 | <string>Settings Dialog</string> |
21 | </property> | 21 | </property> |
22 | <property> | 22 | <property> |
23 | <name>layoutMargin</name> | 23 | <name>layoutMargin</name> |
24 | </property> | 24 | </property> |
25 | <property> | 25 | <property> |
26 | <name>layoutSpacing</name> | 26 | <name>layoutSpacing</name> |
27 | </property> | 27 | </property> |
28 | <vbox> | 28 | <vbox> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>3</number> | 31 | <number>3</number> |
32 | </property> | 32 | </property> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>spacing</name> | 34 | <name>spacing</name> |
35 | <number>3</number> | 35 | <number>3</number> |
36 | </property> | 36 | </property> |
37 | <widget> | 37 | <widget> |
38 | <class>QTabWidget</class> | 38 | <class>QTabWidget</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>name</name> | 40 | <name>name</name> |
41 | <cstring>TabWidget2</cstring> | 41 | <cstring>TabWidget2</cstring> |
42 | </property> | 42 | </property> |
43 | <property> | 43 | <property> |
44 | <name>layoutMargin</name> | 44 | <name>layoutMargin</name> |
45 | </property> | 45 | </property> |
46 | <property> | 46 | <property> |
47 | <name>layoutSpacing</name> | 47 | <name>layoutSpacing</name> |
48 | </property> | 48 | </property> |
49 | <widget> | 49 | <widget> |
50 | <class>QWidget</class> | 50 | <class>QWidget</class> |
51 | <property stdset="1"> | 51 | <property stdset="1"> |
52 | <name>name</name> | 52 | <name>name</name> |
53 | <cstring>tab</cstring> | 53 | <cstring>tab</cstring> |
54 | </property> | 54 | </property> |
55 | <attribute> | 55 | <attribute> |
56 | <name>title</name> | 56 | <name>title</name> |
57 | <string>View Mail</string> | 57 | <string>View Mail</string> |
58 | </attribute> | 58 | </attribute> |
59 | <vbox> | 59 | <vbox> |
60 | <property stdset="1"> | 60 | <property stdset="1"> |
61 | <name>margin</name> | 61 | <name>margin</name> |
62 | <number>3</number> | 62 | <number>3</number> |
63 | </property> | 63 | </property> |
64 | <property stdset="1"> | 64 | <property stdset="1"> |
65 | <name>spacing</name> | 65 | <name>spacing</name> |
66 | <number>3</number> | 66 | <number>3</number> |
67 | </property> | 67 | </property> |
68 | <widget> | 68 | <widget> |
69 | <class>QCheckBox</class> | 69 | <class>QCheckBox</class> |
70 | <property stdset="1"> | 70 | <property stdset="1"> |
71 | <name>name</name> | 71 | <name>name</name> |
72 | <cstring>showHtmlButton</cstring> | 72 | <cstring>showHtmlButton</cstring> |
73 | </property> | 73 | </property> |
74 | <property stdset="1"> | 74 | <property stdset="1"> |
75 | <name>text</name> | 75 | <name>text</name> |
76 | <string>View mail as Html</string> | 76 | <string>View mail as Html</string> |
77 | </property> | 77 | </property> |
78 | </widget> | 78 | </widget> |
@@ -147,128 +147,132 @@ | |||
147 | <size> | 147 | <size> |
148 | <width>20</width> | 148 | <width>20</width> |
149 | <height>20</height> | 149 | <height>20</height> |
150 | </size> | 150 | </size> |
151 | </property> | 151 | </property> |
152 | </spacer> | 152 | </spacer> |
153 | </vbox> | 153 | </vbox> |
154 | </widget> | 154 | </widget> |
155 | <widget> | 155 | <widget> |
156 | <class>QWidget</class> | 156 | <class>QWidget</class> |
157 | <property stdset="1"> | 157 | <property stdset="1"> |
158 | <name>name</name> | 158 | <name>name</name> |
159 | <cstring>tab</cstring> | 159 | <cstring>tab</cstring> |
160 | </property> | 160 | </property> |
161 | <attribute> | 161 | <attribute> |
162 | <name>title</name> | 162 | <name>title</name> |
163 | <string>Taskbar Applet</string> | 163 | <string>Taskbar Applet</string> |
164 | </attribute> | 164 | </attribute> |
165 | <vbox> | 165 | <vbox> |
166 | <property stdset="1"> | 166 | <property stdset="1"> |
167 | <name>margin</name> | 167 | <name>margin</name> |
168 | <number>3</number> | 168 | <number>3</number> |
169 | </property> | 169 | </property> |
170 | <property stdset="1"> | 170 | <property stdset="1"> |
171 | <name>spacing</name> | 171 | <name>spacing</name> |
172 | <number>3</number> | 172 | <number>3</number> |
173 | </property> | 173 | </property> |
174 | <widget> | 174 | <widget> |
175 | <class>QCheckBox</class> | 175 | <class>QCheckBox</class> |
176 | <property stdset="1"> | 176 | <property stdset="1"> |
177 | <name>name</name> | 177 | <name>name</name> |
178 | <cstring>cbEnableTaskbarApplet</cstring> | 178 | <cstring>cbEnableTaskbarApplet</cstring> |
179 | </property> | 179 | </property> |
180 | <property stdset="1"> | 180 | <property stdset="1"> |
181 | <name>text</name> | 181 | <name>text</name> |
182 | <string>Disable Taskbar Applet</string> | 182 | <string>Disable Taskbar Applet</string> |
183 | </property> | 183 | </property> |
184 | </widget> | 184 | </widget> |
185 | <widget> | 185 | <widget> |
186 | <class>QLayoutWidget</class> | 186 | <class>QLayoutWidget</class> |
187 | <property stdset="1"> | 187 | <property stdset="1"> |
188 | <name>name</name> | 188 | <name>name</name> |
189 | <cstring>Layout2</cstring> | 189 | <cstring>Layout2</cstring> |
190 | </property> | 190 | </property> |
191 | <hbox> | 191 | <hbox> |
192 | <property stdset="1"> | 192 | <property stdset="1"> |
193 | <name>margin</name> | 193 | <name>margin</name> |
194 | <number>0</number> | 194 | <number>0</number> |
195 | </property> | 195 | </property> |
196 | <property stdset="1"> | 196 | <property stdset="1"> |
197 | <name>spacing</name> | 197 | <name>spacing</name> |
198 | <number>6</number> | 198 | <number>6</number> |
199 | </property> | 199 | </property> |
200 | <widget> | 200 | <widget> |
201 | <class>QSpinBox</class> | 201 | <class>QSpinBox</class> |
202 | <property stdset="1"> | 202 | <property stdset="1"> |
203 | <name>name</name> | 203 | <name>name</name> |
204 | <cstring>spCheckOften</cstring> | 204 | <cstring>spCheckOften</cstring> |
205 | </property> | 205 | </property> |
206 | <property stdset="1"> | 206 | <property stdset="1"> |
207 | <name>suffix</name> | 207 | <name>suffix</name> |
208 | <string> min</string> | 208 | <string> min</string> |
209 | </property> | 209 | </property> |
210 | <property stdset="1"> | 210 | <property stdset="1"> |
211 | <name>minValue</name> | ||
212 | <number>1</number> | ||
213 | </property> | ||
214 | <property stdset="1"> | ||
211 | <name>value</name> | 215 | <name>value</name> |
212 | <number>5</number> | 216 | <number>5</number> |
213 | </property> | 217 | </property> |
214 | </widget> | 218 | </widget> |
215 | <widget> | 219 | <widget> |
216 | <class>QLabel</class> | 220 | <class>QLabel</class> |
217 | <property stdset="1"> | 221 | <property stdset="1"> |
218 | <name>name</name> | 222 | <name>name</name> |
219 | <cstring>TextLabel1</cstring> | 223 | <cstring>TextLabel1</cstring> |
220 | </property> | 224 | </property> |
221 | <property stdset="1"> | 225 | <property stdset="1"> |
222 | <name>text</name> | 226 | <name>text</name> |
223 | <string>Check how often</string> | 227 | <string>Check how often</string> |
224 | </property> | 228 | </property> |
225 | </widget> | 229 | </widget> |
226 | </hbox> | 230 | </hbox> |
227 | </widget> | 231 | </widget> |
228 | <widget> | 232 | <widget> |
229 | <class>QCheckBox</class> | 233 | <class>QCheckBox</class> |
230 | <property stdset="1"> | 234 | <property stdset="1"> |
231 | <name>name</name> | 235 | <name>name</name> |
232 | <cstring>cbBlinkLed</cstring> | 236 | <cstring>cbBlinkLed</cstring> |
233 | </property> | 237 | </property> |
234 | <property stdset="1"> | 238 | <property stdset="1"> |
235 | <name>text</name> | 239 | <name>text</name> |
236 | <string>Blink Led when new mails arrive</string> | 240 | <string>Blink Led when new mails arrive</string> |
237 | </property> | 241 | </property> |
238 | </widget> | 242 | </widget> |
239 | <widget> | 243 | <widget> |
240 | <class>QCheckBox</class> | 244 | <class>QCheckBox</class> |
241 | <property stdset="1"> | 245 | <property stdset="1"> |
242 | <name>name</name> | 246 | <name>name</name> |
243 | <cstring>cbPlaySound</cstring> | 247 | <cstring>cbPlaySound</cstring> |
244 | </property> | 248 | </property> |
245 | <property stdset="1"> | 249 | <property stdset="1"> |
246 | <name>text</name> | 250 | <name>text</name> |
247 | <string>Play Sound when new mails arrive</string> | 251 | <string>Play Sound when new mails arrive</string> |
248 | </property> | 252 | </property> |
249 | </widget> | 253 | </widget> |
250 | <spacer> | 254 | <spacer> |
251 | <property> | 255 | <property> |
252 | <name>name</name> | 256 | <name>name</name> |
253 | <cstring>Spacer3</cstring> | 257 | <cstring>Spacer3</cstring> |
254 | </property> | 258 | </property> |
255 | <property stdset="1"> | 259 | <property stdset="1"> |
256 | <name>orientation</name> | 260 | <name>orientation</name> |
257 | <enum>Vertical</enum> | 261 | <enum>Vertical</enum> |
258 | </property> | 262 | </property> |
259 | <property stdset="1"> | 263 | <property stdset="1"> |
260 | <name>sizeType</name> | 264 | <name>sizeType</name> |
261 | <enum>Expanding</enum> | 265 | <enum>Expanding</enum> |
262 | </property> | 266 | </property> |
263 | <property> | 267 | <property> |
264 | <name>sizeHint</name> | 268 | <name>sizeHint</name> |
265 | <size> | 269 | <size> |
266 | <width>20</width> | 270 | <width>20</width> |
267 | <height>20</height> | 271 | <height>20</height> |
268 | </size> | 272 | </size> |
269 | </property> | 273 | </property> |
270 | </spacer> | 274 | </spacer> |
271 | </vbox> | 275 | </vbox> |
272 | </widget> | 276 | </widget> |
273 | </widget> | 277 | </widget> |
274 | </vbox> | 278 | </vbox> |