summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-21 13:10:33 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-21 13:10:33 +0000
commit49caa2a6eba44ab23c5dbef14c5c213d856396de (patch)
tree89e2674006d193c4a518bb10753cdc92da6c3751 /src
parent23320f0ffeb9bb5a988978e4f17ced98f99fccf2 (diff)
downloadpoezio-49caa2a6eba44ab23c5dbef14c5c213d856396de.tar.gz
poezio-49caa2a6eba44ab23c5dbef14c5c213d856396de.tar.bz2
poezio-49caa2a6eba44ab23c5dbef14c5c213d856396de.tar.xz
poezio-49caa2a6eba44ab23c5dbef14c5c213d856396de.zip
corrige le bug du clignottement
Diffstat (limited to 'src')
-rw-r--r--src/gui.py12
-rw-r--r--src/window.py10
2 files changed, 12 insertions, 10 deletions
diff --git a/src/gui.py b/src/gui.py
index adae15e7..bc2661b8 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -159,10 +159,11 @@ class Gui(object):
if room_from == room.name:
room.add_message(nick_from, stanza.getBody())
if room == self.rooms[0]:
- # self.window.text_win.refresh(room.lines)
- # self.window.user_win.refresh(room.users)
- # self.window.input.refresh()
- self.window.refresh(self.rooms[0])
+ self.window.text_win.refresh(room.lines)
+ self.window.user_win.refresh(room.users)
+ self.window.input.refresh()
+# self.window.refresh(self.rooms[0])
+ curses.doupdate()
break
def room_presence(self, stanza):
@@ -174,6 +175,7 @@ class Gui(object):
if room == self.rooms[0]:
self.window.text_win.refresh(room.lines)
self.window.user_win.refresh(room.users)
+ curses.doupdate()
break
def execute(self):
@@ -201,7 +203,7 @@ class Gui(object):
def main_loop(self, stdscr):
while 1:
- stdscr.refresh()
+ curses.doupdate()
# self.window.input.refresh()
key = stdscr.getch()
if key == curses.KEY_RESIZE:
diff --git a/src/window.py b/src/window.py
index 1cff8acf..89003456 100644
--- a/src/window.py
+++ b/src/window.py
@@ -52,7 +52,7 @@ class UserList(Win):
self.win.addstr(y, 1, user.nick)
self.win.attroff(curses.color_pair(color))
y += 1
- self.win.refresh()
+ self.win.noutrefresh()
def resize(self, height, width, y, x, stdscr):
self._resize(height, width, y, x, stdscr)
@@ -68,8 +68,8 @@ class Info(Win):
self.win.clear()
self.win.addstr(0, 0, room_name + " "*(self.width-len(room_name)-1)
, curses.color_pair(1))
-# self.win.addstr(0, 0, "fion")
- self.win.refresh()
+ self.win.noutrefresh()
+
class TextWin(Win):
def __init__(self, height, width, y, x, parent_win):
@@ -86,7 +86,7 @@ class TextWin(Win):
elif len(line) == 3:
self.win.addstr(y, 0, '['+line[0].strftime("%H:%M:%S") + "] " + line[1]+": "+line[2])
y += 1
- self.win.refresh()
+ self.win.noutrefresh()
def resize(self, height, width, y, x, stdscr):
self._resize(height, width, y, x, stdscr)
@@ -115,7 +115,7 @@ class Input(Win):
self.txt = self.input.gather()
def refresh(self):
- self.win.refresh()
+ self.win.noutrefresh()
def clear_text(self):
self.win.clear()