summaryrefslogtreecommitdiff
authorumopapisdn <umopapisdn>2002-10-14 20:42:04 (UTC)
committer umopapisdn <umopapisdn>2002-10-14 20:42:04 (UTC)
commit14f450ead20011e5697bb36a4ad087cc648b439d (patch) (unidiff)
tree7b474bbeeba4ceebb50c2da0bf26d80002062970
parent8140420efa133ea59310d3f8de721950fd1d13af (diff)
downloadopie-14f450ead20011e5697bb36a4ad087cc648b439d.zip
opie-14f450ead20011e5697bb36a4ad087cc648b439d.tar.gz
opie-14f450ead20011e5697bb36a4ad087cc648b439d.tar.bz2
New users added in OpenZaurus now by default belong to some groups. (video, audio, time, power, input, sharp, tty)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/usermanager/userdialog.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/noncore/settings/usermanager/userdialog.cpp b/noncore/settings/usermanager/userdialog.cpp
index 90e27d5..c43b391 100644
--- a/noncore/settings/usermanager/userdialog.cpp
+++ b/noncore/settings/usermanager/userdialog.cpp
@@ -14,2 +14,3 @@
14#include <qmessagebox.h> 14#include <qmessagebox.h>
15#include <qfile.h>
15 16
@@ -189,2 +190,5 @@ void UserDialog::setupTab2() {
189bool UserDialog::addUser(int uid, int gid) { 190bool UserDialog::addUser(int uid, int gid) {
191 QCheckListItem *temp;
192 QFile ozTest;
193 int oz=ozTest.exists("/etc/oz_version");
190 UserDialog *adduserDialog=new UserDialog(); 194 UserDialog *adduserDialog=new UserDialog();
@@ -196,2 +200,16 @@ bool UserDialog::addUser(int uid, int gid) {
196 adduserDialog->uidLineEdit->setText(QString::number(uid)); 200 adduserDialog->uidLineEdit->setText(QString::number(uid));
201 // If we're running on OZ, add new users to some default groups.
202 if(oz) {
203 QListViewItemIterator iter( adduserDialog->groupsListView );
204 for ( ; iter.current(); ++iter ) {
205 temp=(QCheckListItem*)iter.current();
206 if (temp->text()=="video") temp->setOn(true);
207 if (temp->text()=="audio") temp->setOn(true);
208 if (temp->text()=="time") temp->setOn(true);
209 if (temp->text()=="power") temp->setOn(true);
210 if (temp->text()=="input") temp->setOn(true);
211 if (temp->text()=="sharp") temp->setOn(true);
212 if (temp->text()=="tty") temp->setOn(true);
213 }
214 }
197 // Show the dialog! 215 // Show the dialog!
@@ -211,7 +229,6 @@ bool UserDialog::addUser(int uid, int gid) {
211 // Add User to additional groups. 229 // Add User to additional groups.
212 QCheckListItem *temp;
213 QListViewItemIterator it( adduserDialog->groupsListView ); 230 QListViewItemIterator it( adduserDialog->groupsListView );
214 for ( ; it.current(); ++it ) { 231 for ( ; it.current(); ++it ) {
215 temp=(QCheckListItem*)it.current(); 232 temp=(QCheckListItem*)it.current();
216 if (temp->isOn() ) 233 if (temp->isOn() )
217 accounts->addGroupMember(it.current()->text(0),adduserDialog->loginLineEdit->text()); 234 accounts->addGroupMember(it.current()->text(0),adduserDialog->loginLineEdit->text());