summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--iw/account.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/iw/account.py b/iw/account.py
index 176c8d308..20e16b4e5 100644
--- a/iw/account.py
+++ b/iw/account.py
@@ -98,6 +98,17 @@ class AccountWindow (InstallWindow):
self.passwords[accountName] = password1
self.newUser()
+ def editUser(self, widget, *args):
+ index = self.userList.selection
+ if (not index): return
+ index = index[0]
+ accountName = self.userList.get_text(index, 0)
+
+ self.editingUser = None
+ del self.passwords[accountName]
+ self.userList.remove(index)
+ self.addUser (None)
+
def deleteUser(self, *args):
index = self.userList.selection
if (not index): return
@@ -218,7 +229,7 @@ class AccountWindow (InstallWindow):
self.add = GtkButton (_("Add"))
self.add.connect("clicked", self.addUser)
self.edit = GtkButton (_("Edit"))
- self.edit.connect("clicked", self.addUser)
+ self.edit.connect("clicked", self.editUser)
delete = GtkButton (_("Delete"))
delete.connect("clicked", self.deleteUser)
new = GtkButton (_("New"))