summaryrefslogtreecommitdiff
path: root/src/gui.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-12 14:57:58 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-12 14:57:58 +0000
commit6298b4331a8c93beac31cb9b85b83892c254f97b (patch)
tree25fe8bf65d68abe02f1b526f3081fe04f3fa5f6c /src/gui.py
parentc7e0fc1c25ce2a3b30557006d4ec607575923be8 (diff)
downloadpoezio-6298b4331a8c93beac31cb9b85b83892c254f97b.tar.gz
poezio-6298b4331a8c93beac31cb9b85b83892c254f97b.tar.bz2
poezio-6298b4331a8c93beac31cb9b85b83892c254f97b.tar.xz
poezio-6298b4331a8c93beac31cb9b85b83892c254f97b.zip
prout
Diffstat (limited to 'src/gui.py')
-rw-r--r--src/gui.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gui.py b/src/gui.py
index 10adb780..aa710caa 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -23,6 +23,8 @@ from curses import textpad
import sys
+from connection import *
+
class Win(object):
def __init__(self, height, width, y, x, parent_win):
self._resize(height, width, y, x, parent_win)
@@ -190,7 +192,7 @@ class Gui(object):
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('gui-join-room', self.on_join_room)
self.handler.connect('on-muc-presence-changed', self.on_presence)
self.init_curses(stdscr)
@@ -234,4 +236,15 @@ def main(stdscr):
gui.main_loop(stdscr)
if __name__ == '__main__':
+ resource = config.get('resource')
+ server = config.get('server')
+ connection = Connection(server, resource)
+ connection.start()
+ rooms = config.get('rooms').split(':')
+ from time import sleep
+ print connection.online
+ sleep(2)
+ print connection.online
+ for room in rooms:
+ connection.send_join_room(room.split('/')[0], room.split('/')[1])
curses.wrapper(main)