summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-02-04 22:15:11 +0000
committerMatt Wilson <msw@redhat.com>2000-02-04 22:15:11 +0000
commite603e4df3d1c974b35d735a11e2f72fd2d2c152e (patch)
tree0b742dfdbeb0acd61abafede2bc34d8d33c05df1 /iw
parentbb2db2bc15f65b2a47ad099f4a69e964a357d12e (diff)
downloadanaconda-e603e4df3d1c974b35d735a11e2f72fd2d2c152e.tar.gz
anaconda-e603e4df3d1c974b35d735a11e2f72fd2d2c152e.tar.xz
anaconda-e603e4df3d1c974b35d735a11e2f72fd2d2c152e.zip
check only typed chars
Diffstat (limited to 'iw')
-rw-r--r--iw/account.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/iw/account.py b/iw/account.py
index 554d8942a..27fdad51b 100644
--- a/iw/account.py
+++ b/iw/account.py
@@ -128,17 +128,21 @@ class AccountWindow (InstallWindow):
self.fullName.set_text("")
def filter(self, widget, text, len, pos):
+ # XXX this doesn't check copy/pase
+ if len != 1:
+ return
+
# first character case:
if not widget.get_text ():
- if (text[0:len] not in string.uppercase and
- text[0:len] not in string.lowercase):
+ if (text[0] not in string.uppercase and
+ text[0] not in string.lowercase):
widget.emit_stop_by_name ("insert-text")
# everything else:
- if (text[0:len] not in string.uppercase and
- text[0:len] not in string.lowercase and
- text[0:len] not in string.digits and
- text[0:len] not in [ '.', '-', '_' ]):
+ if (text[0] not in string.uppercase and
+ text[0] not in string.lowercase and
+ text[0] not in string.digits and
+ text[0] not in [ '.', '-', '_' ]):
widget.emit_stop_by_name ("insert-text")
def getScreen (self):