-rw-r--r-- | etc/ntpservers | 22 | ||||
-rw-r--r-- | i18n/es/netsystemtime.ts | 4 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/settingstabwidget.cpp | 6 |
3 files changed, 16 insertions, 16 deletions
diff --git a/etc/ntpservers b/etc/ntpservers index 5ea836b..2482d31 100644 --- a/etc/ntpservers +++ b/etc/ntpservers | |||
@@ -1,24 +1,24 @@ | |||
1 | [servers] | 1 | [servers] |
2 | count = 11 | 2 | count = 11 |
3 | [0] | 3 | [0] |
4 | name = time.fu-berlin.de | 4 | name = de.pool.ntp.org |
5 | [1] | 5 | [1] |
6 | name = time.ethz.ch | 6 | name = ch.pool.ntp.org |
7 | [2] | 7 | [2] |
8 | name = otc2.psu.edu | 8 | name = us.pool.ntp.org |
9 | [3] | 9 | [3] |
10 | name = ice.mcc.ac.uk | 10 | name = uk.pool.ntp.org |
11 | [4] | 11 | [4] |
12 | name = ptbtime1.ptb.de | 12 | name = 0.de.pool.ntp.org |
13 | [5] | 13 | [5] |
14 | name = bernina.ethz.ch | 14 | name = 0.ch.pool.ntp.org |
15 | [6] | 15 | [6] |
16 | name = ntp.univ-lyon1.fr | 16 | name = fr.pool.ntp.org |
17 | [7] | 17 | [7] |
18 | name = ntp.bri.connect.com.au | 18 | name = au.pool.ntp.org |
19 | [8] | 19 | [8] |
20 | name = nist1.datum.com | 20 | name = 1.us.pool.ntp.org |
21 | [9] | 21 | [9] |
22 | name = time-a.nist.gov | 22 | name = 2.us.pool.ntp.org |
23 | [10] | 23 | [10] |
24 | name = time-b.timefreq.bldrdoc.gov | 24 | name = 3.us.pool.ntp.org |
diff --git a/i18n/es/netsystemtime.ts b/i18n/es/netsystemtime.ts index f777c73..4ad8631 100644 --- a/i18n/es/netsystemtime.ts +++ b/i18n/es/netsystemtime.ts | |||
@@ -1,250 +1,250 @@ | |||
1 | <!DOCTYPE TS><TS> | 1 | <!DOCTYPE TS><TS> |
2 | <context> | 2 | <context> |
3 | <name>Ntp</name> | 3 | <name>Ntp</name> |
4 | <message> | 4 | <message> |
5 | <source>time.fu-berlin.de</source> | 5 | <source>pool.ntp.org</source> |
6 | <translation>time.fu-berlin.de</translation> | 6 | <translation>pool.ntp.org</translation> |
7 | </message> | 7 | </message> |
8 | <message> | 8 | <message> |
9 | <source>Run NTP?</source> | 9 | <source>Run NTP?</source> |
10 | <translation>¿Ejecutar NTP?</translation> | 10 | <translation>¿Ejecutar NTP?</translation> |
11 | </message> | 11 | </message> |
12 | <message> | 12 | <message> |
13 | <source>You asked for a delay of </source> | 13 | <source>You asked for a delay of </source> |
14 | <translation>Preguntó por un retraso de </translation> | 14 | <translation>Preguntó por un retraso de </translation> |
15 | </message> | 15 | </message> |
16 | <message> | 16 | <message> |
17 | <source> minutes, but only </source> | 17 | <source> minutes, but only </source> |
18 | <translation> minutos, pero sólo </translation> | 18 | <translation> minutos, pero sólo </translation> |
19 | </message> | 19 | </message> |
20 | <message> | 20 | <message> |
21 | <source> minutes elapsed since last loopup.</source> | 21 | <source> minutes elapsed since last loopup.</source> |
22 | <translation> minutos transcurrieron desde el último ajuste.</translation> | 22 | <translation> minutos transcurrieron desde el último ajuste.</translation> |
23 | </message> | 23 | </message> |
24 | <message> | 24 | <message> |
25 | <source>Rerun NTP?</source> | 25 | <source>Rerun NTP?</source> |
26 | <translation>¿Reiniciar NTP?</translation> | 26 | <translation>¿Reiniciar NTP?</translation> |
27 | </message> | 27 | </message> |
28 | <message> | 28 | <message> |
29 | <source>Running:</source> | 29 | <source>Running:</source> |
30 | <translation>Ejecutando:</translation> | 30 | <translation>Ejecutando:</translation> |
31 | </message> | 31 | </message> |
32 | <message> | 32 | <message> |
33 | <source>Error while executing ntpdate</source> | 33 | <source>Error while executing ntpdate</source> |
34 | <translation>Error mientras ejecutaba ntpdate</translation> | 34 | <translation>Error mientras ejecutaba ntpdate</translation> |
35 | </message> | 35 | </message> |
36 | <message> | 36 | <message> |
37 | <source> seconds</source> | 37 | <source> seconds</source> |
38 | <translation> segundos</translation> | 38 | <translation> segundos</translation> |
39 | </message> | 39 | </message> |
40 | <message> | 40 | <message> |
41 | <source>last [h]</source> | 41 | <source>last [h]</source> |
42 | <translation>último [h]</translation> | 42 | <translation>último [h]</translation> |
43 | </message> | 43 | </message> |
44 | <message> | 44 | <message> |
45 | <source>offset [s]</source> | 45 | <source>offset [s]</source> |
46 | <translation>corrección [s]</translation> | 46 | <translation>corrección [s]</translation> |
47 | </message> | 47 | </message> |
48 | <message> | 48 | <message> |
49 | <source>shift [s/h]</source> | 49 | <source>shift [s/h]</source> |
50 | <translation>ajuste [s/h]</translation> | 50 | <translation>ajuste [s/h]</translation> |
51 | </message> | 51 | </message> |
52 | <message> | 52 | <message> |
53 | <source> s/h</source> | 53 | <source> s/h</source> |
54 | <translation> s/h</translation> | 54 | <translation> s/h</translation> |
55 | </message> | 55 | </message> |
56 | <message> | 56 | <message> |
57 | <source>Predicted time:</source> | 57 | <source>Predicted time:</source> |
58 | <translation>Predicción de hora:</translation> | 58 | <translation>Predicción de hora:</translation> |
59 | </message> | 59 | </message> |
60 | <message> | 60 | <message> |
61 | <source>Get time from network</source> | 61 | <source>Get time from network</source> |
62 | <translation>Obtener hora de la Red</translation> | 62 | <translation>Obtener hora de la Red</translation> |
63 | </message> | 63 | </message> |
64 | <message> | 64 | <message> |
65 | <source>Set predicted time</source> | 65 | <source>Set predicted time</source> |
66 | <translation>Fijar predicción de hora</translation> | 66 | <translation>Fijar predicción de hora</translation> |
67 | </message> | 67 | </message> |
68 | <message> | 68 | <message> |
69 | <source>Could not connect to server </source> | 69 | <source>Could not connect to server </source> |
70 | <translation>No pude conectar con el servidor </translation> | 70 | <translation>No pude conectar con el servidor </translation> |
71 | </message> | 71 | </message> |
72 | </context> | 72 | </context> |
73 | <context> | 73 | <context> |
74 | <name>NtpBase</name> | 74 | <name>NtpBase</name> |
75 | <message> | 75 | <message> |
76 | <source>Network Time</source> | 76 | <source>Network Time</source> |
77 | <translation>Hora de la Red</translation> | 77 | <translation>Hora de la Red</translation> |
78 | </message> | 78 | </message> |
79 | <message> | 79 | <message> |
80 | <source>NTP</source> | 80 | <source>NTP</source> |
81 | <translation>NTP</translation> | 81 | <translation>NTP</translation> |
82 | </message> | 82 | </message> |
83 | <message> | 83 | <message> |
84 | <source>Start Time:</source> | 84 | <source>Start Time:</source> |
85 | <translation>Hora inicio:</translation> | 85 | <translation>Hora inicio:</translation> |
86 | </message> | 86 | </message> |
87 | <message> | 87 | <message> |
88 | <source>nan</source> | 88 | <source>nan</source> |
89 | <translation>nan</translation> | 89 | <translation>nan</translation> |
90 | </message> | 90 | </message> |
91 | <message> | 91 | <message> |
92 | <source>Time Shift:</source> | 92 | <source>Time Shift:</source> |
93 | <translation>Ajuste de hora:</translation> | 93 | <translation>Ajuste de hora:</translation> |
94 | </message> | 94 | </message> |
95 | <message> | 95 | <message> |
96 | <source>New Time:</source> | 96 | <source>New Time:</source> |
97 | <translation>Nueva hora:</translation> | 97 | <translation>Nueva hora:</translation> |
98 | </message> | 98 | </message> |
99 | <message> | 99 | <message> |
100 | <source>Mean shift:</source> | 100 | <source>Mean shift:</source> |
101 | <translation>Ajuste promedio:</translation> | 101 | <translation>Ajuste promedio:</translation> |
102 | </message> | 102 | </message> |
103 | <message> | 103 | <message> |
104 | <source>Main</source> | 104 | <source>Main</source> |
105 | <translation>Principal</translation> | 105 | <translation>Principal</translation> |
106 | </message> | 106 | </message> |
107 | <message> | 107 | <message> |
108 | <source>Get time from network</source> | 108 | <source>Get time from network</source> |
109 | <translation>Obtener hora de la Red</translation> | 109 | <translation>Obtener hora de la Red</translation> |
110 | </message> | 110 | </message> |
111 | <message> | 111 | <message> |
112 | <source>Predict</source> | 112 | <source>Predict</source> |
113 | <translation>Predecir</translation> | 113 | <translation>Predecir</translation> |
114 | </message> | 114 | </message> |
115 | <message> | 115 | <message> |
116 | <source>Esimated Shift:</source> | 116 | <source>Esimated Shift:</source> |
117 | <translation>Ajuste estimado:</translation> | 117 | <translation>Ajuste estimado:</translation> |
118 | </message> | 118 | </message> |
119 | <message> | 119 | <message> |
120 | <source>Predicted Time:</source> | 120 | <source>Predicted Time:</source> |
121 | <translation>Predicción de hora:</translation> | 121 | <translation>Predicción de hora:</translation> |
122 | </message> | 122 | </message> |
123 | <message> | 123 | <message> |
124 | <source>Set predicted time</source> | 124 | <source>Set predicted time</source> |
125 | <translation>Fijar predicción de hora</translation> | 125 | <translation>Fijar predicción de hora</translation> |
126 | </message> | 126 | </message> |
127 | <message> | 127 | <message> |
128 | <source>Predict time</source> | 128 | <source>Predict time</source> |
129 | <translation>Predicción de hora</translation> | 129 | <translation>Predicción de hora</translation> |
130 | </message> | 130 | </message> |
131 | <message> | 131 | <message> |
132 | <source>Settings</source> | 132 | <source>Settings</source> |
133 | <translation>Configuración</translation> | 133 | <translation>Configuración</translation> |
134 | </message> | 134 | </message> |
135 | <message> | 135 | <message> |
136 | <source>Use</source> | 136 | <source>Use</source> |
137 | <translation>Usar</translation> | 137 | <translation>Usar</translation> |
138 | </message> | 138 | </message> |
139 | <message> | 139 | <message> |
140 | <source>as</source> | 140 | <source>as</source> |
141 | <translation>como</translation> | 141 | <translation>como</translation> |
142 | </message> | 142 | </message> |
143 | <message> | 143 | <message> |
144 | <source>NTP server to get the time from the network.</source> | 144 | <source>NTP server to get the time from the network.</source> |
145 | <translation>servidor NTP para obtener la hora de la Red.</translation> | 145 | <translation>servidor NTP para obtener la hora de la Red.</translation> |
146 | </message> | 146 | </message> |
147 | <message> | 147 | <message> |
148 | <source>Insure a delay of</source> | 148 | <source>Insure a delay of</source> |
149 | <translation>Asegurar un retraso de</translation> | 149 | <translation>Asegurar un retraso de</translation> |
150 | </message> | 150 | </message> |
151 | <message> | 151 | <message> |
152 | <source>minutes until</source> | 152 | <source>minutes until</source> |
153 | <translation>minutos hasta que</translation> | 153 | <translation>minutos hasta que</translation> |
154 | </message> | 154 | </message> |
155 | <message> | 155 | <message> |
156 | <source>a new NTP lookup will be used to predict the time.</source> | 156 | <source>a new NTP lookup will be used to predict the time.</source> |
157 | <translation>una nueva conexión NTP será usada para predecir la hora.</translation> | 157 | <translation>una nueva conexión NTP será usada para predecir la hora.</translation> |
158 | </message> | 158 | </message> |
159 | <message> | 159 | <message> |
160 | <source>Wait for </source> | 160 | <source>Wait for </source> |
161 | <translation>Esperar </translation> | 161 | <translation>Esperar </translation> |
162 | </message> | 162 | </message> |
163 | <message> | 163 | <message> |
164 | <source>NTP tries to syncronises the clock with the network.</source> | 164 | <source>NTP tries to syncronises the clock with the network.</source> |
165 | <translation>intentos NTP para sincronizar el reloj con la Red.</translation> | 165 | <translation>intentos NTP para sincronizar el reloj con la Red.</translation> |
166 | </message> | 166 | </message> |
167 | <message> | 167 | <message> |
168 | <source>Manual</source> | 168 | <source>Manual</source> |
169 | <translation>Manual</translation> | 169 | <translation>Manual</translation> |
170 | </message> | 170 | </message> |
171 | <message> | 171 | <message> |
172 | <source>Set time</source> | 172 | <source>Set time</source> |
173 | <translation>Fijar hora</translation> | 173 | <translation>Fijar hora</translation> |
174 | </message> | 174 | </message> |
175 | </context> | 175 | </context> |
176 | <context> | 176 | <context> |
177 | <name>SetDateTime</name> | 177 | <name>SetDateTime</name> |
178 | <message> | 178 | <message> |
179 | <source>Time Zone</source> | 179 | <source>Time Zone</source> |
180 | <translation>Zona horaria</translation> | 180 | <translation>Zona horaria</translation> |
181 | </message> | 181 | </message> |
182 | <message> | 182 | <message> |
183 | <source>Date</source> | 183 | <source>Date</source> |
184 | <translation>Fecha</translation> | 184 | <translation>Fecha</translation> |
185 | </message> | 185 | </message> |
186 | <message> | 186 | <message> |
187 | <source>Time format</source> | 187 | <source>Time format</source> |
188 | <translation>Formato hora</translation> | 188 | <translation>Formato hora</translation> |
189 | </message> | 189 | </message> |
190 | <message> | 190 | <message> |
191 | <source>24 hour</source> | 191 | <source>24 hour</source> |
192 | <translation>24 horas</translation> | 192 | <translation>24 horas</translation> |
193 | </message> | 193 | </message> |
194 | <message> | 194 | <message> |
195 | <source>12 hour</source> | 195 | <source>12 hour</source> |
196 | <translation>12 horas</translation> | 196 | <translation>12 horas</translation> |
197 | </message> | 197 | </message> |
198 | <message> | 198 | <message> |
199 | <source>Weeks start on</source> | 199 | <source>Weeks start on</source> |
200 | <translation>La semana enpieza el</translation> | 200 | <translation>La semana enpieza el</translation> |
201 | </message> | 201 | </message> |
202 | <message> | 202 | <message> |
203 | <source>Sunday</source> | 203 | <source>Sunday</source> |
204 | <translation>Domingo</translation> | 204 | <translation>Domingo</translation> |
205 | </message> | 205 | </message> |
206 | <message> | 206 | <message> |
207 | <source>Monday</source> | 207 | <source>Monday</source> |
208 | <translation>Lunes</translation> | 208 | <translation>Lunes</translation> |
209 | </message> | 209 | </message> |
210 | <message> | 210 | <message> |
211 | <source>Date format</source> | 211 | <source>Date format</source> |
212 | <translation>Formato fecha</translation> | 212 | <translation>Formato fecha</translation> |
213 | </message> | 213 | </message> |
214 | <message> | 214 | <message> |
215 | <source>Applet format</source> | 215 | <source>Applet format</source> |
216 | <translation>Formato icono</translation> | 216 | <translation>Formato icono</translation> |
217 | </message> | 217 | </message> |
218 | <message> | 218 | <message> |
219 | <source>hh:mm</source> | 219 | <source>hh:mm</source> |
220 | <translation>hh:mm</translation> | 220 | <translation>hh:mm</translation> |
221 | </message> | 221 | </message> |
222 | <message> | 222 | <message> |
223 | <source>D/M hh:mm</source> | 223 | <source>D/M hh:mm</source> |
224 | <translation>D/M hh:mm</translation> | 224 | <translation>D/M hh:mm</translation> |
225 | </message> | 225 | </message> |
226 | <message> | 226 | <message> |
227 | <source>M/D hh:mm</source> | 227 | <source>M/D hh:mm</source> |
228 | <translation>M/D hh:mm</translation> | 228 | <translation>M/D hh:mm</translation> |
229 | </message> | 229 | </message> |
230 | </context> | 230 | </context> |
231 | <context> | 231 | <context> |
232 | <name>SetTime</name> | 232 | <name>SetTime</name> |
233 | <message> | 233 | <message> |
234 | <source>Hour</source> | 234 | <source>Hour</source> |
235 | <translation>Hora</translation> | 235 | <translation>Hora</translation> |
236 | </message> | 236 | </message> |
237 | <message> | 237 | <message> |
238 | <source>Minute</source> | 238 | <source>Minute</source> |
239 | <translation>Minuto</translation> | 239 | <translation>Minuto</translation> |
240 | </message> | 240 | </message> |
241 | <message> | 241 | <message> |
242 | <source>AM</source> | 242 | <source>AM</source> |
243 | <translation>AM</translation> | 243 | <translation>AM</translation> |
244 | </message> | 244 | </message> |
245 | <message> | 245 | <message> |
246 | <source>PM</source> | 246 | <source>PM</source> |
247 | <translation>PM</translation> | 247 | <translation>PM</translation> |
248 | </message> | 248 | </message> |
249 | </context> | 249 | </context> |
250 | </TS> | 250 | </TS> |
diff --git a/noncore/settings/netsystemtime/settingstabwidget.cpp b/noncore/settings/netsystemtime/settingstabwidget.cpp index 3bb0ec3..b26e751 100644 --- a/noncore/settings/netsystemtime/settingstabwidget.cpp +++ b/noncore/settings/netsystemtime/settingstabwidget.cpp | |||
@@ -1,163 +1,163 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | 4 | Copyright (C) Opie Team <opie-devel@handhelds.org> |
5 | =. | 5 | =. |
6 | .=l. | 6 | .=l. |
7 | .>+-= | 7 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 8 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "settingstabwidget.h" | 31 | #include "settingstabwidget.h" |
32 | 32 | ||
33 | #include <qpe/config.h> | 33 | #include <qpe/config.h> |
34 | #include <qpe/qpeapplication.h> | 34 | #include <qpe/qpeapplication.h> |
35 | 35 | ||
36 | #include <qcheckbox.h> | 36 | #include <qcheckbox.h> |
37 | #include <qcombobox.h> | 37 | #include <qcombobox.h> |
38 | #include <qlabel.h> | 38 | #include <qlabel.h> |
39 | #include <qlayout.h> | 39 | #include <qlayout.h> |
40 | #include <qscrollview.h> | 40 | #include <qscrollview.h> |
41 | #include <qspinbox.h> | 41 | #include <qspinbox.h> |
42 | 42 | ||
43 | SettingsTabWidget::SettingsTabWidget( QWidget *parent ) | 43 | SettingsTabWidget::SettingsTabWidget( QWidget *parent ) |
44 | : QWidget( parent, 0x0, 0 ) | 44 | : QWidget( parent, 0x0, 0 ) |
45 | { | 45 | { |
46 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); | 46 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); |
47 | QScrollView *sv = new QScrollView( this ); | 47 | QScrollView *sv = new QScrollView( this ); |
48 | tmpvb->addWidget( sv, 0, 0 ); | 48 | tmpvb->addWidget( sv, 0, 0 ); |
49 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 49 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
50 | sv->setFrameStyle( QFrame::NoFrame ); | 50 | sv->setFrameStyle( QFrame::NoFrame ); |
51 | QWidget *container = new QWidget( sv->viewport() ); | 51 | QWidget *container = new QWidget( sv->viewport() ); |
52 | sv->addChild( container ); | 52 | sv->addChild( container ); |
53 | 53 | ||
54 | QGridLayout *layout = new QGridLayout( container ); | 54 | QGridLayout *layout = new QGridLayout( container ); |
55 | layout->setMargin( 2 ); | 55 | layout->setMargin( 2 ); |
56 | layout->setSpacing( 4 ); | 56 | layout->setSpacing( 4 ); |
57 | 57 | ||
58 | // Time server selector | 58 | // Time server selector |
59 | layout->addWidget( new QLabel( tr( "Time server" ), container ), 0, 0 ); | 59 | layout->addWidget( new QLabel( tr( "Time server" ), container ), 0, 0 ); |
60 | cbTimeServer = new QComboBox( TRUE, container ); | 60 | cbTimeServer = new QComboBox( TRUE, container ); |
61 | layout->addMultiCellWidget( cbTimeServer, 1, 1, 0, 1 ); | 61 | layout->addMultiCellWidget( cbTimeServer, 1, 1, 0, 1 ); |
62 | 62 | ||
63 | // Lookup delay selector | 63 | // Lookup delay selector |
64 | layout->addWidget( new QLabel( tr( "minutes between time updates" ), container ), 2, 1 ); | 64 | layout->addWidget( new QLabel( tr( "minutes between time updates" ), container ), 2, 1 ); |
65 | sbNtpDelay = new QSpinBox( 1, 9999999, 1, container ); | 65 | sbNtpDelay = new QSpinBox( 1, 9999999, 1, container ); |
66 | sbNtpDelay->setWrapping( TRUE ); | 66 | sbNtpDelay->setWrapping( TRUE ); |
67 | sbNtpDelay->setMaximumWidth( 50 ); | 67 | sbNtpDelay->setMaximumWidth( 50 ); |
68 | connect( sbNtpDelay, SIGNAL(valueChanged(int)), this, SIGNAL(ntpDelayChanged(int)) ); | 68 | connect( sbNtpDelay, SIGNAL(valueChanged(int)), this, SIGNAL(ntpDelayChanged(int)) ); |
69 | layout->addWidget( sbNtpDelay, 2, 0 ); | 69 | layout->addWidget( sbNtpDelay, 2, 0 ); |
70 | 70 | ||
71 | // Prediction delay selector | 71 | // Prediction delay selector |
72 | layout->addWidget( new QLabel( tr( "minutes between prediction updates" ), container ), 3, 1 ); | 72 | layout->addWidget( new QLabel( tr( "minutes between prediction updates" ), container ), 3, 1 ); |
73 | sbPredictDelay = new QSpinBox( 42, 9999999, 1, container ); | 73 | sbPredictDelay = new QSpinBox( 42, 9999999, 1, container ); |
74 | sbPredictDelay->setWrapping( TRUE ); | 74 | sbPredictDelay->setWrapping( TRUE ); |
75 | sbPredictDelay->setMaximumWidth( 50 ); | 75 | sbPredictDelay->setMaximumWidth( 50 ); |
76 | layout->addWidget( sbPredictDelay, 3, 0 ); | 76 | layout->addWidget( sbPredictDelay, 3, 0 ); |
77 | 77 | ||
78 | // Space filler | 78 | // Space filler |
79 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ), 4, 0 ); | 79 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ), 4, 0 ); |
80 | 80 | ||
81 | // Display time server information selector | 81 | // Display time server information selector |
82 | chNtpTab = new QCheckBox( tr( "Display time server information" ), container ); | 82 | chNtpTab = new QCheckBox( tr( "Display time server information" ), container ); |
83 | connect( chNtpTab, SIGNAL( toggled(bool) ), this, SIGNAL( displayNTPTab(bool) ) ); | 83 | connect( chNtpTab, SIGNAL( toggled(bool) ), this, SIGNAL( displayNTPTab(bool) ) ); |
84 | layout->addMultiCellWidget( chNtpTab, 5, 5, 0, 1 ); | 84 | layout->addMultiCellWidget( chNtpTab, 5, 5, 0, 1 ); |
85 | 85 | ||
86 | // Display time prediction information selector | 86 | // Display time prediction information selector |
87 | chPredictTab = new QCheckBox( tr( "Display time prediction information" ), container ); | 87 | chPredictTab = new QCheckBox( tr( "Display time prediction information" ), container ); |
88 | connect( chPredictTab, SIGNAL( toggled(bool) ), this, SIGNAL( displayPredictTab(bool) ) ); | 88 | connect( chPredictTab, SIGNAL( toggled(bool) ), this, SIGNAL( displayPredictTab(bool) ) ); |
89 | layout->addMultiCellWidget( chPredictTab, 6, 6, 0, 1 ); | 89 | layout->addMultiCellWidget( chPredictTab, 6, 6, 0, 1 ); |
90 | 90 | ||
91 | // Space filler | 91 | // Space filler |
92 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ), 7, 0 ); | 92 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ), 7, 0 ); |
93 | 93 | ||
94 | // Initialize values | 94 | // Initialize values |
95 | QString ntpSrvsFile = QPEApplication::qpeDir(); | 95 | QString ntpSrvsFile = QPEApplication::qpeDir(); |
96 | ntpSrvsFile.append( "etc/ntpservers" ); | 96 | ntpSrvsFile.append( "etc/ntpservers" ); |
97 | Config ntpSrvs( ntpSrvsFile, Config::File ); | 97 | Config ntpSrvs( ntpSrvsFile, Config::File ); |
98 | ntpSrvs.setGroup( "servers" ); | 98 | ntpSrvs.setGroup( "servers" ); |
99 | int srvCount = ntpSrvs.readNumEntry( "count", 0 ); | 99 | int srvCount = ntpSrvs.readNumEntry( "count", 0 ); |
100 | for ( int i = 0; i < srvCount; i++ ) | 100 | for ( int i = 0; i < srvCount; i++ ) |
101 | { | 101 | { |
102 | ntpSrvs.setGroup( QString::number( i ) ); | 102 | ntpSrvs.setGroup( QString::number( i ) ); |
103 | cbTimeServer->insertItem( ntpSrvs.readEntry( "name" ) ); | 103 | cbTimeServer->insertItem( ntpSrvs.readEntry( "name" ) ); |
104 | } | 104 | } |
105 | if ( srvCount==0 ) { | 105 | if ( srvCount==0 ) { |
106 | cbTimeServer->insertItem( "time.fu-berlin.de" ); | 106 | cbTimeServer->insertItem( "0.pool.ntp.org" ); |
107 | cbTimeServer->insertItem( "time-a.nist.gov" ); | 107 | cbTimeServer->insertItem( "1.pool.ntp.org" ); |
108 | cbTimeServer->insertItem( "ntp.bri.connect.com.au" ); | 108 | cbTimeServer->insertItem( "2.pool.ntp.org" ); |
109 | } | 109 | } |
110 | Config config( "ntp" ); | 110 | Config config( "ntp" ); |
111 | config.setGroup( "settings" ); | 111 | config.setGroup( "settings" ); |
112 | sbPredictDelay->setValue( config.readNumEntry( "minLookupDiff", 720 ) ); | 112 | sbPredictDelay->setValue( config.readNumEntry( "minLookupDiff", 720 ) ); |
113 | sbNtpDelay->setValue( config.readNumEntry( "ntpRefreshFreq", 1440 ) ); | 113 | sbNtpDelay->setValue( config.readNumEntry( "ntpRefreshFreq", 1440 ) ); |
114 | cbTimeServer->setCurrentItem( config.readNumEntry( "ntpServer", 0 ) ); | 114 | cbTimeServer->setCurrentItem( config.readNumEntry( "ntpServer", 0 ) ); |
115 | chNtpTab->setChecked( config.readBoolEntry( "displayNtpTab", FALSE ) ); | 115 | chNtpTab->setChecked( config.readBoolEntry( "displayNtpTab", FALSE ) ); |
116 | chPredictTab->setChecked( config.readBoolEntry( "displayPredictTab", FALSE ) ); | 116 | chPredictTab->setChecked( config.readBoolEntry( "displayPredictTab", FALSE ) ); |
117 | } | 117 | } |
118 | 118 | ||
119 | SettingsTabWidget::~SettingsTabWidget() | 119 | SettingsTabWidget::~SettingsTabWidget() |
120 | { | 120 | { |
121 | } | 121 | } |
122 | 122 | ||
123 | void SettingsTabWidget::saveSettings() | 123 | void SettingsTabWidget::saveSettings() |
124 | { | 124 | { |
125 | int srvCount = cbTimeServer->count(); | 125 | int srvCount = cbTimeServer->count(); |
126 | bool serversChanged = TRUE; | 126 | bool serversChanged = TRUE; |
127 | int curSrv = cbTimeServer->currentItem(); | 127 | int curSrv = cbTimeServer->currentItem(); |
128 | QString edit = cbTimeServer->currentText(); | 128 | QString edit = cbTimeServer->currentText(); |
129 | for ( int i = 0; i < srvCount; i++ ) | 129 | for ( int i = 0; i < srvCount; i++ ) |
130 | { | 130 | { |
131 | if ( edit == cbTimeServer->text( i ) ) | 131 | if ( edit == cbTimeServer->text( i ) ) |
132 | serversChanged = FALSE; | 132 | serversChanged = FALSE; |
133 | } | 133 | } |
134 | if ( serversChanged ) | 134 | if ( serversChanged ) |
135 | { | 135 | { |
136 | QString ntpSrvsFile = QPEApplication::qpeDir(); | 136 | QString ntpSrvsFile = QPEApplication::qpeDir(); |
137 | ntpSrvsFile.append( "etc/ntpservers" ); | 137 | ntpSrvsFile.append( "etc/ntpservers" ); |
138 | Config ntpSrvs( ntpSrvsFile, Config::File ); | 138 | Config ntpSrvs( ntpSrvsFile, Config::File ); |
139 | ntpSrvs.setGroup( "servers" ); | 139 | ntpSrvs.setGroup( "servers" ); |
140 | ntpSrvs.writeEntry( "count", ++srvCount ); | 140 | ntpSrvs.writeEntry( "count", ++srvCount ); |
141 | ntpSrvs.setGroup( "0" ); | 141 | ntpSrvs.setGroup( "0" ); |
142 | ntpSrvs.writeEntry( "name", edit ); | 142 | ntpSrvs.writeEntry( "name", edit ); |
143 | curSrv = 0; | 143 | curSrv = 0; |
144 | for ( int i = 1; i < srvCount; i++ ) | 144 | for ( int i = 1; i < srvCount; i++ ) |
145 | { | 145 | { |
146 | // odebug << "ntpSrvs[" << i << "/" << srvCount << "]=" << cbTimeServer->text( i ).latin1() << "" << oendl; | 146 | // odebug << "ntpSrvs[" << i << "/" << srvCount << "]=" << cbTimeServer->text( i ).latin1() << "" << oendl; |
147 | ntpSrvs.setGroup( QString::number( i ) ); | 147 | ntpSrvs.setGroup( QString::number( i ) ); |
148 | ntpSrvs.writeEntry( "name", cbTimeServer->text( i-1 ) ); | 148 | ntpSrvs.writeEntry( "name", cbTimeServer->text( i-1 ) ); |
149 | } | 149 | } |
150 | } | 150 | } |
151 | Config config( "ntp", Config::User ); | 151 | Config config( "ntp", Config::User ); |
152 | config.setGroup( "settings" ); | 152 | config.setGroup( "settings" ); |
153 | config.writeEntry( "ntpServer", curSrv ); | 153 | config.writeEntry( "ntpServer", curSrv ); |
154 | config.writeEntry( "minLookupDiff", sbPredictDelay->value() ); | 154 | config.writeEntry( "minLookupDiff", sbPredictDelay->value() ); |
155 | config.writeEntry( "ntpRefreshFreq", sbNtpDelay->value() ); | 155 | config.writeEntry( "ntpRefreshFreq", sbNtpDelay->value() ); |
156 | config.writeEntry( "displayNtpTab", chNtpTab->isChecked() ); | 156 | config.writeEntry( "displayNtpTab", chNtpTab->isChecked() ); |
157 | config.writeEntry( "displayPredictTab", chPredictTab->isChecked() ); | 157 | config.writeEntry( "displayPredictTab", chPredictTab->isChecked() ); |
158 | } | 158 | } |
159 | 159 | ||
160 | QString SettingsTabWidget::ntpServer() | 160 | QString SettingsTabWidget::ntpServer() |
161 | { | 161 | { |
162 | return cbTimeServer->currentText(); | 162 | return cbTimeServer->currentText(); |
163 | } | 163 | } |