summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-08-26 20:21:54 +0200
committerBoris Faure <billiob@gmail.com>2018-08-26 20:22:40 +0200
commit3b8bbb70c67c10809f82b71c0836314f0a2fcaab (patch)
tree3ef8e19a6e26390945342a0663c2569e57c38cbc /src/bin
parente2712c51539824fddf9b0ae98b414f304a6e6f62 (diff)
controls: be able to show the settings twice or more
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/controls.c35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/bin/controls.c b/src/bin/controls.c
index b28f47c..c9cf83f 100644
--- a/src/bin/controls.c
+++ b/src/bin/controls.c
@@ -50,14 +50,25 @@ _cb_sel_off(void *data,
50} 50}
51 51
52static void 52static void
53_cb_del(void *data, 53_cb_hidden(void *data,
54 Evas *_e EINA_UNUSED, 54 Evas *_e EINA_UNUSED,
55 Evas_Object *_obj EINA_UNUSED, 55 Evas_Object *_obj EINA_UNUSED,
56 void *_ev EINA_UNUSED) 56 void *_ev EINA_UNUSED)
57{ 57{
58 Evas_Object *frame = data; 58 Controls_Ctx *ctx = data;
59 Evas_Object *frame = ctx->frame;
60 Evas_Object *o;
61
59 evas_object_del(frame); 62 evas_object_del(frame);
63
64 o = edje_object_part_swallow_get(ctx->base, "terminology.controls");
65 if (o)
66 {
67 edje_object_part_unswallow(ctx->base, o);
68 }
69
60 elm_cache_all_flush(); 70 elm_cache_all_flush();
71 free(ctx);
61} 72}
62 73
63static void 74static void
@@ -149,16 +160,20 @@ _on_sub_done(void *data)
149{ 160{
150 Controls_Ctx *ctx = data; 161 Controls_Ctx *ctx = data;
151 162
152 evas_object_event_callback_add(ctx->frame, EVAS_CALLBACK_HIDE,
153 _cb_del, ctx->frame);
154 ctx->frame = NULL;
155
156 if (ctx->donecb) 163 if (ctx->donecb)
157 ctx->donecb(ctx->donedata); 164 ctx->donecb(ctx->donedata);
158 165
159 eina_hash_del(controls, &ctx->win, ctx); 166 eina_hash_del(controls, &ctx->win, ctx);
160 167
161 free(ctx); 168 if (evas_object_visible_get(ctx->frame))
169 {
170 evas_object_event_callback_add(ctx->frame, EVAS_CALLBACK_HIDE,
171 _cb_hidden, ctx);
172 }
173 else
174 {
175 _cb_hidden(ctx, NULL, NULL, NULL);
176 }
162} 177}
163 178
164static void 179static void