From 3eb7e7688dea39fa83f41c1f9aba79a962ef1a15 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 25 Jun 2010 04:36:06 +0200 Subject: Create conversation tabs for new conversations --- src/gui/CoreConnector.vala | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/gui/CoreConnector.vala') diff --git a/src/gui/CoreConnector.vala b/src/gui/CoreConnector.vala index 9c492b7..18cef2d 100644 --- a/src/gui/CoreConnector.vala +++ b/src/gui/CoreConnector.vala @@ -6,7 +6,8 @@ public class CoreConnector { Erl.Connection con; Erl.Term self; - Roster roster; + public signal void update_contact(Contact contact); + public signal void new_conversation(string jid); private class TermStore { public Erl.Term term; @@ -16,9 +17,8 @@ public class CoreConnector { Erl.init(); } - public CoreConnector(Roster roster0) { + public CoreConnector() { running = false; - roster = roster0; } public bool start() { @@ -166,7 +166,16 @@ public class CoreConnector { } } - roster.update_contact(contact); + update_contact(contact); + } + else if((match_term = match("{new_conversation,JID}", term)) != null) { + Erl.Term jid_term = match_term.var_content("JID"); + if(!jid_term.is_binary()) + // TODO Debug output + return; + string jid = ((string)jid_term.bin_ptr()).ndup(jid_term.bin_size()); + + new_conversation(jid); } else { Erl.print_term(stdout, term); -- cgit v1.2.3