add_comment function added

add_comment function added

comment posting implemented

delay added after successful comment posting

cursor added for commenting

reply functionality added

comment box expanded

bug fixed: you can only comment on 'Comment' type

bug fixed: you can only comment on 'Comment' or 'Submission' type
This commit is contained in:
ysakamoto
2015-03-12 17:44:37 -05:00
parent 418e11d2aa
commit da851ec048
2 changed files with 56 additions and 5 deletions

View File

@@ -118,7 +118,7 @@ def load_config():
return defaults
def text_input(window):
def text_input(window, show_cursor=False, insert_mode=True):
"""
Transform a window into a text box that will accept user input and loop
until an escape sequence is entered.
@@ -128,8 +128,8 @@ def text_input(window):
"""
window.clear()
curses.curs_set(2)
textbox = textpad.Textbox(window, insert_mode=True)
curses.curs_set(1 if show_cursor else 2)
textbox = textpad.Textbox(window, insert_mode=insert_mode)
def validate(ch):
"Filters characters for special key sequences"