summaryrefslogtreecommitdiff
authoralwin <alwin>2005-03-12 18:25:40 (UTC)
committer alwin <alwin>2005-03-12 18:25:40 (UTC)
commit9dddeb81d7db5da718f3f467bb1511b7e72b9caa (patch) (unidiff)
tree4ebb3ca0a3c13d5c6229429a530480e0737a1713
parentf195cfb8a11a0b5ef6fd397cc835af59b4266c8c (diff)
downloadopie-9dddeb81d7db5da718f3f467bb1511b7e72b9caa.zip
opie-9dddeb81d7db5da718f3f467bb1511b7e72b9caa.tar.gz
opie-9dddeb81d7db5da718f3f467bb1511b7e72b9caa.tar.bz2
check range for aplett timeout
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/settingsdialog.cpp4
-rw-r--r--noncore/net/mail/settingsdialogui.ui6
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
@@ -25,25 +25,27 @@ void SettingsDialog::readConfig() {
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
33void SettingsDialog::writeConfig() { 33void 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
46void SettingsDialog::accept() { 48void 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,30 +1,30 @@
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>
@@ -195,32 +195,36 @@
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>