summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-12 10:42:37 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-12 10:42:37 +0000
commitc1b84e2a3b31a296a4c92268e19171a0bad9d14b (patch)
tree7811dd7c4c878f6bbf99f4bcb5012cb71183011b
parent72aabb2902bede53bbeb1585605ae20ffd1c5628 (diff)
downloadpoezio-c1b84e2a3b31a296a4c92268e19171a0bad9d14b.tar.gz
poezio-c1b84e2a3b31a296a4c92268e19171a0bad9d14b.tar.bz2
poezio-c1b84e2a3b31a296a4c92268e19171a0bad9d14b.tar.xz
poezio-c1b84e2a3b31a296a4c92268e19171a0bad9d14b.zip
df
-rw-r--r--src/gui.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gui.py b/src/gui.py
index 93e92f46..3ee23e08 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -52,26 +52,26 @@ class Gui(object):
"""
Graphical user interface using ncurses
"""
- def __init__(self):
+ def __init__(self, stdscr):
self.handler = Handler()
self.handler.connect('on-muc-message-received', self.on_message)
self.handler.connect('join-room', self.on_join_room)
self.handler.connect('on-muc-presence-changed', self.on_presence)
- self.init_curses()
+ self.init_curses(stdscr)
- def __del__(self):
- curses.nocbreak();
- self.stdscr.keypad(0);
- curses.echo()
- curses.endwin()
+ # def __del__(self):
+ # curses.nocbreak();
+ # self.stdscr.keypad(0);
+ # curses.echo()
+ # curses.endwin()
- def init_curses(self):
- self.stdscr= curses.initscr()
- curses.noecho()
- curses.cbreak()
- self.current_tab = Tab(self.stdscr)
+ def init_curses(self, stdscr):
+# self.stdscr= curses.initscr()
+ # curses.noecho()
+ # curses.cbreak()
+ self.current_tab = Tab(stdscr)
def main_loop(self, stdscr):
while 1:
@@ -93,7 +93,7 @@ class Gui(object):
return self.stdscr.getch()
def main(stdscr):
- gui = Gui()
+ gui = Gui(stdscr)
gui.main_loop(stdscr)
if __name__ == '__main__':