summaryrefslogtreecommitdiff
path: root/src/bin/main.c
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2013-12-24 17:11:28 +0200
committerYakov Goldberg <yakov.g@samsung.com>2013-12-24 19:08:45 +0200
commita558c1503eb3ff093610223f03b3ba791f756f27 (patch)
tree0bdb183dc4f2f0122609a52cde048063041dfdb6 /src/bin/main.c
parent86fbf84a4baa23b6908d333903d88aae6a42011a (diff)
add list of simulate sessions into the context
- and delete sessions, which are in progress, on project_close()
Diffstat (limited to 'src/bin/main.c')
-rw-r--r--src/bin/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index 4641149..1411cd7 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -36,9 +36,12 @@ _generate(const char *filename, const char* path, const char *project)
36} 36}
37 37
38static void 38static void
39_population_zero_cb(Gui_Session *session, void *data EINA_UNUSED) 39_population_zero_cb(Gui_Session *session, void *data)
40{ 40{
41 Gui_Context *ctx = data;
41 session_target_win_unset(session); 42 session_target_win_unset(session);
43 /* Remove session from list of sessions in progress. */
44 gui_context_simulate_session_remove(ctx, session);
42 session_del(session); 45 session_del(session);
43} 46}
44 47
@@ -61,7 +64,7 @@ _simulate(const char *filename, const char *target_name)
61 * when simulated windows or target win will be closed. */ 64 * when simulated windows or target win will be closed. */
62 Gui_Session *session = simulator_ctx_call(ctx, target_name); 65 Gui_Session *session = simulator_ctx_call(ctx, target_name);
63 if (!session) goto end; 66 if (!session) goto end;
64 session_population_zero_cb_set(session, _population_zero_cb, NULL); 67 session_population_zero_cb_set(session, _population_zero_cb, ctx);
65 68
66 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 69 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
67 elm_run(); 70 elm_run();