From 72aabb2902bede53bbeb1585605ae20ffd1c5628 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Mon, 11 Jan 2010 15:08:11 +0000 Subject: rien --- src/gui.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/gui.py b/src/gui.py index 3a14ada2..93e92f46 100644 --- a/src/gui.py +++ b/src/gui.py @@ -21,7 +21,7 @@ from handler import Handler import curses from curses import textpad -class Tab(curses.Window): +class Tab(object): """ The whole "screen" that can be seen at once in the terminal. It contains an userlist, an input zone and a chat zone, all @@ -38,7 +38,9 @@ class Tab(curses.Window): """ self.name = name self.size = (self.height, self.width) = stdscr.getmaxyx() - +# self.window = curses.newwin(0, 0)#, self.height, self.width) + self.input = textpad.Textbox(stdscr) +# self.window.refresh() def resize(self, y, x): """ @@ -67,19 +69,16 @@ class Gui(object): def init_curses(self): self.stdscr= curses.initscr() -# self.stdscr = curses.newwin(1, 1000, 0, 0) curses.noecho() curses.cbreak() -# curses.meta(True) -# self.stdscr.keypad(1) - self.input = textpad.Textbox(self.stdscr) + self.current_tab = Tab(self.stdscr) def main_loop(self, stdscr): while 1: key = stdscr.getch() if key == curses.KEY_RESIZE: pass - self.input.do_command(key) + self.current_tab.input.do_command(key) def on_message(self, jid, msg, subject, typ, stanza): print "on_message", jid, msg, subject, typ -- cgit v1.2.3