/[gli]/trunk/src/fe/dialog/dialogfe.py
Gentoo

Diff of /trunk/src/fe/dialog/dialogfe.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 267 Revision 268
393 if code != DLG_OK: continue 393 if code != DLG_OK: continue
394 for user in users: 394 for user in users:
395 if newuser == user[0]: 395 if newuser == user[0]:
396 d.msgbox("A user with that name already exists") 396 d.msgbox("A user with that name already exists")
397 continue 397 continue
398 new_user = (newuser, '', ('users'), '/bin/bash', '/home' + newuser, '', '') 398 new_user = [newuser, '', ('users'), '/bin/bash', '/home' + newuser, '', '']
399 users.append(new_user) 399 users.append(new_user)
400 menuitem = newuser 400 menuitem = newuser
401 while 1: 401 while 1:
402 menulist = ["Password", "Group Membership", "Shell", "Home Directory", "UID", "Comment", "Delete"] 402 menulist = ["Password", "Group Membership", "Shell", "Home Directory", "UID", "Comment", "Delete"]
403 code, menuitem2 = d.menu("Choose an option for user " + menuitem, choices=dmenu_list_to_choices(menulist), cancel="Back") 403 code, menuitem2 = d.menu("Choose an option for user " + menuitem, choices=dmenu_list_to_choices(menulist), cancel="Back")
413 continue 413 continue
414 for user in users: 414 for user in users:
415 if user[0] == menuitem: user[1] = crypt.crypt(passwd1, get_random_salt()) 415 if user[0] == menuitem: user[1] = crypt.crypt(passwd1, get_random_salt())
416 continue 416 continue
417 elif menuitem2 == "Group Membership": 417 elif menuitem2 == "Group Membership":
418 d.msgbox("Groups") 418 code, groups = d.inputbox("Enter a space-separated list of groups the user is to be in")
419 if code != DLG_OK: continue
420 newgroups = []
421 groups = string.split(groups)
422 for group in groups:
423 new_groups.append(group)
424 for user in users:
425 if user[0] == menuitem:
426 user[2] = new_groups
427 continue
428
419 elif menuitem2 == "Shell": 429 elif menuitem2 == "Shell":
420 d.msgbox("Shell") 430 d.msgbox("Shell")
421 elif menuitem2 == "Home Directory": 431 elif menuitem2 == "Home Directory":
422 d.msgbox("homedir") 432 d.msgbox("homedir")
423 elif menuitem2 == "UID": 433 elif menuitem2 == "UID":

Legend:
Removed from v.267  
changed lines
  Added in v.268

  ViewVC Help
Powered by ViewVC 1.1.20