summaryrefslogtreecommitdiff
authortille <tille>2002-07-22 10:43:11 (UTC)
committer tille <tille>2002-07-22 10:43:11 (UTC)
commit3878c4883ce02dd98122695ffa678c3f54f704bb (patch) (unidiff)
treeed388ed88085aacd2bef4d412a98cec772983589
parent0a22d863b288a0b499cfc249126a342aeda2b628 (diff)
downloadopie-3878c4883ce02dd98122695ffa678c3f54f704bb.zip
opie-3878c4883ce02dd98122695ffa678c3f54f704bb.tar.gz
opie-3878c4883ce02dd98122695ffa678c3f54f704bb.tar.bz2
fixes bug #133 -- added two tr("")
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/security/security.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp
index 6c1931a..2821f4b 100644
--- a/core/settings/security/security.cpp
+++ b/core/settings/security/security.cpp
@@ -152,83 +152,83 @@ void Security::parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits)
152 for (int i=0; i<4; i++) { 152 for (int i=0; i<4; i++) {
153 int nx = sn.find(QChar(i==3 ? '/' : '.'),x); 153 int nx = sn.find(QChar(i==3 ? '/' : '.'),x);
154 auth_peer = (auth_peer<<8)|sn.mid(x,nx-x).toInt(); 154 auth_peer = (auth_peer<<8)|sn.mid(x,nx-x).toInt();
155 x = nx+1; 155 x = nx+1;
156 } 156 }
157 uint n = (uint)sn.find(' ',x)-x; 157 uint n = (uint)sn.find(' ',x)-x;
158 auth_peer_bits = sn.mid(x,n).toInt(); 158 auth_peer_bits = sn.mid(x,n).toInt();
159 } 159 }
160} 160}
161 161
162void Security::setSyncNet(const QString& sn) 162void Security::setSyncNet(const QString& sn)
163{ 163{
164 int auth_peer,auth_peer_bits; 164 int auth_peer,auth_peer_bits;
165 parseNet(sn,auth_peer,auth_peer_bits); 165 parseNet(sn,auth_peer,auth_peer_bits);
166 selectNet(auth_peer,auth_peer_bits); 166 selectNet(auth_peer,auth_peer_bits);
167} 167}
168 168
169void Security::applySecurity() 169void Security::applySecurity()
170{ 170{
171 if ( valid ) { 171 if ( valid ) {
172 Config cfg("Security"); 172 Config cfg("Security");
173 cfg.setGroup("Passcode"); 173 cfg.setGroup("Passcode");
174 cfg.writeEntry("passcode",passcode); 174 cfg.writeEntry("passcode",passcode);
175 cfg.writeEntry("passcode_poweron",passcode_poweron->isChecked()); 175 cfg.writeEntry("passcode_poweron",passcode_poweron->isChecked());
176 cfg.setGroup("Sync"); 176 cfg.setGroup("Sync");
177 int auth_peer=0; 177 int auth_peer=0;
178 int auth_peer_bits; 178 int auth_peer_bits;
179 QString sn = syncnet->currentText(); 179 QString sn = syncnet->currentText();
180 parseNet(sn,auth_peer,auth_peer_bits); 180 parseNet(sn,auth_peer,auth_peer_bits);
181 cfg.writeEntry("auth_peer",auth_peer); 181 cfg.writeEntry("auth_peer",auth_peer);
182 cfg.writeEntry("auth_peer_bits",auth_peer_bits); 182 cfg.writeEntry("auth_peer_bits",auth_peer_bits);
183 /* 183 /*
184 cfg.setGroup("Remote"); 184 cfg.setGroup("Remote");
185 if ( telnetAvailable() ) 185 if ( telnetAvailable() )
186 cfg.writeEntry("allow_telnet",telnet->isChecked()); 186 cfg.writeEntry("allow_telnet",telnet->isChecked());
187 if ( sshAvailable() ) 187 if ( sshAvailable() )
188 cfg.writeEntry("allow_ssh",ssh->isChecked()); 188 cfg.writeEntry("allow_ssh",ssh->isChecked());
189 // ### write ssh/telnet sys config files 189 // ### write ssh/telnet sys config files
190 */ 190 */
191 } 191 }
192} 192}
193 193
194void Security::changePassCode() 194void Security::changePassCode()
195{ 195{
196 QString new1; 196 QString new1;
197 QString new2; 197 QString new2;
198 198
199 do { 199 do {
200 new1 = enterPassCode("Enter new passcode"); 200 new1 = enterPassCode(tr("Enter new passcode"));
201 if ( new1.isNull() ) 201 if ( new1.isNull() )
202 return; 202 return;
203 new2 = enterPassCode("Re-enter new passcode"); 203 new2 = enterPassCode(tr("Re-enter new passcode"));
204 if ( new2.isNull() ) 204 if ( new2.isNull() )
205 return; 205 return;
206 } while (new1 != new2); 206 } while (new1 != new2);
207 207
208 passcode = new1; 208 passcode = new1;
209 updateGUI(); 209 updateGUI();
210} 210}
211 211
212void Security::clearPassCode() 212void Security::clearPassCode()
213{ 213{
214 passcode = QString::null; 214 passcode = QString::null;
215 updateGUI(); 215 updateGUI();
216} 216}
217 217
218 218
219QString Security::enterPassCode(const QString& prompt) 219QString Security::enterPassCode(const QString& prompt)
220{ 220{
221 return Password::getPassword(prompt); 221 return Password::getPassword(prompt);
222} 222}
223 223
224bool Security::telnetAvailable() const 224bool Security::telnetAvailable() const
225{ 225{
226 // ### not implemented 226 // ### not implemented
227 return FALSE; 227 return FALSE;
228} 228}
229 229
230bool Security::sshAvailable() const 230bool Security::sshAvailable() const
231{ 231{
232 // ### not implemented 232 // ### not implemented
233 return FALSE; 233 return FALSE;
234} 234}