fixed #1176 much better when the userlist needs to be refreshed
This commit is contained in:
parent
cceae04061
commit
8b1487c3c3
2 changed files with 5 additions and 3 deletions
|
@ -234,6 +234,7 @@ class Gui(object):
|
|||
|
||||
def main_loop(self, stdscr):
|
||||
while 1:
|
||||
stdscr.leaveok(1)
|
||||
curses.doupdate()
|
||||
try:
|
||||
key = stdscr.getkey()
|
||||
|
@ -397,8 +398,6 @@ class Gui(object):
|
|||
if room == self.current_room() and msg:
|
||||
self.window.text_win.add_line(room, (datetime.now(), msg))
|
||||
self.window.text_win.refresh(room.name)
|
||||
self.window.user_win.refresh(room.users)
|
||||
self.window.text_win.refresh()
|
||||
self.window.input.refresh()
|
||||
curses.doupdate()
|
||||
|
||||
|
@ -406,7 +405,6 @@ class Gui(object):
|
|||
line = self.window.input.get_text()
|
||||
self.window.input.clear_text()
|
||||
self.window.input.refresh()
|
||||
curses.doupdate()
|
||||
if line == "":
|
||||
return
|
||||
if line.startswith('/'):
|
||||
|
@ -422,6 +420,7 @@ class Gui(object):
|
|||
self.window.text_win.refresh(self.current_room().name)
|
||||
elif self.current_room().name != 'Info':
|
||||
self.muc.send_message(self.current_room().name, line)
|
||||
curses.doupdate()
|
||||
self.window.input.refresh()
|
||||
|
||||
def command_help(self, args):
|
||||
|
|
|
@ -27,6 +27,7 @@ class Win(object):
|
|||
def _resize(self, height, width, y, x, parent_win):
|
||||
self.height, self.width, self.x, self.y = height, width, x, y
|
||||
self.win = parent_win.subwin(height, width, y, x)
|
||||
self.win.leaveok(1)
|
||||
|
||||
def refresh(self):
|
||||
self.win.noutrefresh()
|
||||
|
@ -216,6 +217,7 @@ class TextWin(object):
|
|||
newwin = Win(self.height, self.width, self.y, self.x, self.parent_win)
|
||||
newwin.win.idlok(True)
|
||||
newwin.win.scrollok(True)
|
||||
newwin.win.leaveok(1)
|
||||
self.wins[winname] = newwin
|
||||
|
||||
def resize(self, height, width, y, x, stdscr, visible):
|
||||
|
@ -232,6 +234,7 @@ class Input(Win):
|
|||
"""
|
||||
def __init__(self, height, width, y, x, stdscr, visible):
|
||||
Win.__init__(self, height, width, y, x, stdscr)
|
||||
self.win.leaveok(0)
|
||||
self.visible = visible
|
||||
self.history = []
|
||||
self.text = u''
|
||||
|
|
Loading…
Reference in a new issue