1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-19 12:28:08 +01:00

curses/curses_misc.py:

Fixed some of the arguments in MaskingEdit
curses/netentry_curses.py:
  Added an autoconnect switch to the WirelessSettingsDialog
  Reformatted some code
  Ensured that the buttons are glued to the bottom of the dialog
AUTHORS:
  Changed Adam's e-mail to match the ones in the man page.
AUTHORS, in/man=wicd.8.in:
  Added/updated my e-mail
in/man=wicd-curses.8.in:
  Removed mention of the keymap modification (too difficult/potentially
    problematic)
  Removed mention of my branch, bugs can be tagged with "wicd-curses" or something
    like that
This commit is contained in:
Andrew Psaltis
2009-02-17 20:04:50 -05:00
parent 080f7216b2
commit 1ab13ae618
6 changed files with 40 additions and 31 deletions

View File

@@ -110,13 +110,13 @@ class MaskingEdit(urwid.Edit):
"""
mask_mode = one of:
"always" : everything is a '*' all of the time
"on_focus" : everything is a '*' only when not in focus
"no_focus" : everything is a '*' only when not in focus
"off" : everything is always unmasked
mask_char = the single character that masks all other characters in the field
"""
def __init__(self, caption = "", edit_text = "", multiline = False,
align = 'left', wrap = 'space', allow_tab = False,
edit_pos = None, layout=None, mask_mode="masked",mask_char='*'):
edit_pos = None, layout=None, mask_mode="always",mask_char='*'):
self.mask_mode = mask_mode
if len(mask_char) > 1:
raise MaskingEditException('Masks of more than one character are not supported!')
@@ -137,7 +137,7 @@ class MaskingEdit(urwid.Edit):
focus.
"""
# If we aren't masking anything ATM, then act like an Edit. No problems.
if self.mask_mode == "off" or (self.mask_mode == 'on_focus' and focus == True):
if self.mask_mode == "off" or (self.mask_mode == 'no_focus' and focus == True):
canv = self.__super.render((maxcol,),focus)
# The cache messes this thing up, because I am totally changing what
# is displayed.