summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-01-31 23:03:41 +0000
committerJeremy Katz <katzj@redhat.com>2002-01-31 23:03:41 +0000
commitf1acd89982e50e2fc7cd821c56365b9eba5437c6 (patch)
tree5208dca8c75f54e9511dbef97a1b56eddefda322
parent802512616c9f7b3a7c0f580ff39ec70fb4efac50 (diff)
downloadanaconda-f1acd89982e50e2fc7cd821c56365b9eba5437c6.tar.gz
anaconda-f1acd89982e50e2fc7cd821c56365b9eba5437c6.tar.xz
anaconda-f1acd89982e50e2fc7cd821c56365b9eba5437c6.zip
add a shadow to the user list
getting the iter root doesn't return None if there is nothing in the store so we can't use that. hack around it for now
-rw-r--r--iw/account_gui.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/iw/account_gui.py b/iw/account_gui.py
index 52d3bc308..4b165745f 100644
--- a/iw/account_gui.py
+++ b/iw/account_gui.py
@@ -33,6 +33,11 @@ class AccountWindow (InstallWindow):
self.rootPw.set (self.pw.get_text ())
accounts = []
+ # XXX hack
+ if self.users == 0:
+ self.accounts.setUserList(accounts)
+ return None
+
iter = self.userstore.get_iter_root()
next = iter
while next:
@@ -141,6 +146,9 @@ class AccountWindow (InstallWindow):
self.accountName.grab_focus ()
self.passwords[accountName] = password1
+ # XXX hack
+ self.users = self.users + 1
+
self.userlist.get_selection().select_iter(iter)
self.win.destroy()
@@ -285,6 +293,9 @@ class AccountWindow (InstallWindow):
self.edit.set_sensitive(gtk.FALSE)
self.delete.set_sensitive(gtk.FALSE)
+ # XXX hack
+ self.users = self.users - 1
+
def filter(self, widget, text, len, pos):
# XXX this doesn't check copy/pase
if len != 1:
@@ -313,6 +324,10 @@ class AccountWindow (InstallWindow):
self.passwords = {}
+ # XXX hack because store.get_iter_root ALWAYS returns a
+ # GtkTreeIter so we can't just iterate over them and find the empty one
+ self.users = 0
+
box = gtk.VBox ()
hbox = gtk.HBox()
@@ -377,6 +392,7 @@ class AccountWindow (InstallWindow):
sw = gtk.ScrolledWindow ()
sw.set_policy (gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+ sw.set_shadow_type(gtk.SHADOW_ETCHED_IN)
self.userstore = gtk.ListStore(gobject.TYPE_STRING,
gobject.TYPE_STRING)
@@ -443,6 +459,9 @@ class AccountWindow (InstallWindow):
self.userstore.set_value(iter, 1, name)
self.passwords[user] = password
+ # XXX hack
+ self.users = self.users + 1
+
if flags.reconfig:
label.set_sensitive(gtk.FALSE)
self.userList.set_sensitive(gtk.FALSE)