Mercurial > urwid-satext
comparison frontends/primitivus/custom_widgets.py @ 25:e6bd6146dd31
Primitivus: fixed focus in Input dialog
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 18 Aug 2010 17:26:34 +0800 |
parents | 67a19cfeab8f |
children | fcc20ac7b68a |
comparison
equal
deleted
inserted
replaced
24:67a19cfeab8f | 25:e6bd6146dd31 |
---|---|
720 | 720 |
721 def __init__(self, title, instrucions, style=['OK/CANCEL'], default_txt = '', **kwargs): | 721 def __init__(self, title, instrucions, style=['OK/CANCEL'], default_txt = '', **kwargs): |
722 instr_wid = urwid.Text(instrucions+':') | 722 instr_wid = urwid.Text(instrucions+':') |
723 edit_box = AdvancedEdit(edit_text=default_txt) | 723 edit_box = AdvancedEdit(edit_text=default_txt) |
724 GenericDialog.__init__(self, [instr_wid,edit_box], title, style, ok_value=edit_box, **kwargs) | 724 GenericDialog.__init__(self, [instr_wid,edit_box], title, style, ok_value=edit_box, **kwargs) |
725 self._w.base_widget.set_focus('body') | |
725 | 726 |
726 class ConfirmDialog(GenericDialog): | 727 class ConfirmDialog(GenericDialog): |
727 """Dialog with buttons for confirm or cancel an action""" | 728 """Dialog with buttons for confirm or cancel an action""" |
728 | 729 |
729 def __init__(self, title, style=['YES/NO'], **kwargs): | 730 def __init__(self, title, style=['YES/NO'], **kwargs): |