[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src/cursing TextBox.py
From: |
Jason Cater |
Subject: |
gnue/common/src/cursing TextBox.py |
Date: |
Thu, 10 Oct 2002 01:23:37 -0400 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/10/10 01:23:35
Modified files:
common/src/cursing: TextBox.py
Log message:
added support for 'Password'-style data entry (text hidden by '*')
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/src/cursing/TextBox.py.diff?cvsroot=OldCVS&tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: gnue/common/src/cursing/TextBox.py
diff -c gnue/common/src/cursing/TextBox.py:1.3
gnue/common/src/cursing/TextBox.py:1.4
*** gnue/common/src/cursing/TextBox.py:1.3 Wed Oct 9 23:42:11 2002
--- gnue/common/src/cursing/TextBox.py Thu Oct 10 01:23:35 2002
***************
*** 37,43 ****
An example textbox control. Allows the user to enter text. Only
basic editing though
"""
! def __init__(self, Parent, TextboxName, Y, X, W, DefaultValue="",
**properties):
apply(Control.__init__, (self, Parent, TextboxName), properties)
self.PARENT = Parent
--- 37,43 ----
An example textbox control. Allows the user to enter text. Only
basic editing though
"""
! def __init__(self, Parent, TextboxName, Y, X, W, DefaultValue="",
password=0,
**properties):
apply(Control.__init__, (self, Parent, TextboxName), properties)
self.PARENT = Parent
***************
*** 91,97 ****
curses.curs_set(0)
except:
pass
! return
Depth = self.DEPTH
Text = self.TEXT
global BACKWARDS
--- 91,97 ----
curses.curs_set(0)
except:
pass
! return
Depth = self.DEPTH
Text = self.TEXT
global BACKWARDS
***************
*** 140,153 ****
self.DEPTH = Depth
self.TEXT = Text
self.Paint(None, None, None)
!
def BogusVerify(self, TheControl, TheText, v3):
return 1
def Paint(self, v1, v2, v3):
Container = self.PARENT.Screen()
- Text = self.TEXT
TextLen = len(Text)
W = self.W
Depth = self.DEPTH
Visuals = ''
--- 140,158 ----
self.DEPTH = Depth
self.TEXT = Text
self.Paint(None, None, None)
!
def BogusVerify(self, TheControl, TheText, v3):
return 1
def Paint(self, v1, v2, v3):
Container = self.PARENT.Screen()
TextLen = len(Text)
+
+ if self.PASSWORD:
+ Text = "*" * TextLen
+ else:
+ Text = self.TEXT
+
W = self.W
Depth = self.DEPTH
Visuals = ''
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/common/src/cursing TextBox.py,
Jason Cater <=