summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/security/security.cpp17
-rw-r--r--core/settings/security/securitybase.ui27
2 files changed, 38 insertions, 6 deletions
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp
index 75a181b..c4726b3 100644
--- a/core/settings/security/security.cpp
+++ b/core/settings/security/security.cpp
@@ -24,4 +24,5 @@
24#include <qpe/password.h> 24#include <qpe/password.h>
25#include <qpe/qpedialog.h> 25#include <qpe/qpedialog.h>
26#include <qpe/qcopenvelope_qws.h>
26 27
27#include <qcheckbox.h> 28#include <qcheckbox.h>
@@ -73,4 +74,7 @@
73 } 74 }
74 75
76 cfg.setGroup("SyncMode");
77 int mode = cfg.readNumEntry("Mode",2); // Default to Sharp
78 syncModeCombo->setCurrentItem( mode - 1 );
75 79
76 connect(autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool))); 80 connect(autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool)));
@@ -133,4 +137,5 @@ void Security::accept()
133 applySecurity(); 137 applySecurity();
134 QDialog::accept(); 138 QDialog::accept();
139 QCopEnvelope env("QPE/System", "securityChanged()" );
135} 140}
136 141
@@ -186,12 +191,12 @@ void Security::parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits)
186} 191}
187 192
188void Security::loadUsers ( void ) 193void Security::loadUsers ( void )
189{ 194{
190 QFile passwd("/etc/passwd"); 195 QFile passwd("/etc/passwd");
191 if ( passwd.open(IO_ReadOnly) ) { 196 if ( passwd.open(IO_ReadOnly) ) {
192 QTextStream t( &passwd ); 197 QTextStream t( &passwd );
193 QString s; 198 QString s;
194 QStringList account; 199 QStringList account;
195 while ( !t.eof() ) { 200 while ( !t.eof() ) {
196 account = QStringList::split(':',t.readLine()); 201 account = QStringList::split(':',t.readLine());
197 202
@@ -201,5 +206,5 @@ void Security::loadUsers ( void )
201 userlist->insertItem(*account.at(0)); 206 userlist->insertItem(*account.at(0));
202 // Highlight this item if it is set to autologinToggle 207 // Highlight this item if it is set to autologinToggle
203 if ( *account.at(0) == autoLoginName) 208 if ( *account.at(0) == autoLoginName)
204 userlist->setCurrentItem(userlist->count()-1); 209 userlist->setCurrentItem(userlist->count()-1);
205 } 210 }
@@ -213,5 +218,5 @@ void Security::toggleAutoLogin(bool val)
213 autoLogin=val; 218 autoLogin=val;
214 userlist->setEnabled(val); 219 userlist->setEnabled(val);
215 if (!autoLogin) 220 if (!autoLogin)
216 autoLoginName=userlist->currentText(); 221 autoLoginName=userlist->currentText();
217} 222}
@@ -256,4 +261,6 @@ void Security::applySecurity()
256 } 261 }
257 262
263 cfg.setGroup("SyncMode");
264 cfg.writeEntry("Mode", syncModeCombo->currentItem()+1 );
258 } 265 }
259} 266}
diff --git a/core/settings/security/securitybase.ui b/core/settings/security/securitybase.ui
index da25f39..73290e5 100644
--- a/core/settings/security/securitybase.ui
+++ b/core/settings/security/securitybase.ui
@@ -12,5 +12,5 @@
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>329</width> 14 <width>339</width>
15 <height>483</height> 15 <height>483</height>
16 </rect> 16 </rect>
@@ -382,4 +382,29 @@
382 </property> 382 </property>
383 </widget> 383 </widget>
384 <widget>
385 <class>QComboBox</class>
386 <item>
387 <property>
388 <name>text</name>
389 <string>Qtopia 1.7</string>
390 </property>
391 </item>
392 <item>
393 <property>
394 <name>text</name>
395 <string>Opie 1.0</string>
396 </property>
397 </item>
398 <item>
399 <property>
400 <name>text</name>
401 <string>Both</string>
402 </property>
403 </item>
404 <property stdset="1">
405 <name>name</name>
406 <cstring>syncModeCombo</cstring>
407 </property>
408 </widget>
384 </vbox> 409 </vbox>
385 </widget> 410 </widget>