summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
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):