forked from enlightenment/terminology
controls: keep ctx when on about/options
This commit is contained in:
parent
fd150de222
commit
08b5c20a27
|
@ -141,6 +141,22 @@ _cb_ct_close(void *data,
|
|||
term_close(win, term, EINA_FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
_on_sub_done(void *data)
|
||||
{
|
||||
struct controls_ctx *ctx = data;
|
||||
|
||||
ecore_timer_add(10.0, _cb_del_delay, ctx->frame);
|
||||
ctx->frame = NULL;
|
||||
|
||||
if (ctx->donecb)
|
||||
ctx->donecb(ctx->donedata);
|
||||
|
||||
eina_hash_del(controls, &ctx->win, ctx);
|
||||
|
||||
free(ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_ct_options(void *data,
|
||||
Evas_Object *_obj EINA_UNUSED,
|
||||
|
@ -148,10 +164,11 @@ _cb_ct_options(void *data,
|
|||
{
|
||||
struct controls_ctx *ctx = data;
|
||||
|
||||
options_show(ctx->win, ctx->bg, ctx->term, ctx->donecb, ctx->donedata);
|
||||
options_show(ctx->win, ctx->bg, ctx->term, _on_sub_done, ctx);
|
||||
controls_hide(ctx, EINA_FALSE);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_cb_ct_about(void *data,
|
||||
Evas_Object *_obj EINA_UNUSED,
|
||||
|
@ -159,7 +176,7 @@ _cb_ct_about(void *data,
|
|||
{
|
||||
struct controls_ctx *ctx = data;
|
||||
|
||||
about_show(ctx->win, ctx->bg, ctx->term, ctx->donecb, ctx->donedata);
|
||||
about_show(ctx->win, ctx->bg, ctx->term, _on_sub_done, ctx);
|
||||
controls_hide(ctx, EINA_FALSE);
|
||||
}
|
||||
|
||||
|
@ -259,15 +276,18 @@ controls_hide(struct controls_ctx *ctx, Eina_Bool call_cb)
|
|||
}
|
||||
elm_object_focus_set(ctx->frame, EINA_FALSE);
|
||||
|
||||
ecore_timer_add(10.0, _cb_del_delay, ctx->frame);
|
||||
ctx->frame = NULL;
|
||||
if (call_cb)
|
||||
{
|
||||
ecore_timer_add(10.0, _cb_del_delay, ctx->frame);
|
||||
ctx->frame = NULL;
|
||||
|
||||
if (call_cb && ctx->donecb)
|
||||
ctx->donecb(ctx->donedata);
|
||||
if (ctx->donecb)
|
||||
ctx->donecb(ctx->donedata);
|
||||
|
||||
eina_hash_del(controls, &ctx->win, ctx);
|
||||
eina_hash_del(controls, &ctx->win, ctx);
|
||||
|
||||
free(ctx);
|
||||
free(ctx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -273,9 +273,3 @@ options_show(Evas_Object *win, Evas_Object *bg, Evas_Object *term,
|
|||
edje_object_signal_emit(ctx->bg, "options,show", "terminology");
|
||||
elm_object_focus_set(ctx->toolbar, EINA_TRUE);
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
options_is_active(Evas_Object *win EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,5 @@
|
|||
|
||||
void options_show(Evas_Object *win, Evas_Object *bg, Evas_Object *term,
|
||||
void (*donecb) (void *data), void *donedata);
|
||||
Eina_Bool options_is_active(Evas_Object *win);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue