summaryrefslogtreecommitdiffstats
path: root/src/core/ephraim.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ephraim.erl')
-rw-r--r--src/core/ephraim.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/ephraim.erl b/src/core/ephraim.erl
index c0ab7ae..b32e1d7 100644
--- a/src/core/ephraim.erl
+++ b/src/core/ephraim.erl
@@ -5,6 +5,7 @@
conn :: pid(),
roster :: pid(),
event :: pid(),
+ gui :: pid(),
convs :: dict(),
uis :: set()
}).
@@ -22,12 +23,12 @@ stop() ->
-spec init() -> ok.
init() ->
register(ephraim, self()),
- open_port({spawn_executable, "ephraim-gtk"}, [stream, use_stdio, out]),
+ GUI = spawn(ephraim_gui, init, []),
Conn = spawn(ephraim_conn, init, []),
Roster = spawn(ephraim_roster, init, []),
Event = spawn(ephraim_event, init, []),
- loop(#state{conn=Conn,roster=Roster,event=Event,convs=dict:new(),uis=sets:new()}),
+ loop(#state{conn=Conn,roster=Roster,event=Event,gui=GUI,convs=dict:new(),uis=sets:new()}),
init:stop().
-spec get_conv(#state{},exmpp_jid:jid()) -> {#state{},pid()|undefined}.
@@ -59,6 +60,7 @@ loop(State) ->
State#state.conn ! stop,
State#state.roster ! stop,
State#state.event ! stop,
+ State#state.gui ! stop,
ok;
{register_ui, Pid} ->