forked from enlightenment/enventor
code refactoring.
tools_close() returns a result in order that the caller decides a next behavior.
This commit is contained in:
parent
ede00648d9
commit
5c23a5b661
|
@ -1006,11 +1006,11 @@ live_edit_get(void)
|
|||
return ld->on;
|
||||
}
|
||||
|
||||
void
|
||||
Eina_Bool
|
||||
live_edit_cancel(void)
|
||||
{
|
||||
live_data *ld = g_ld;
|
||||
if (!ld->on) return;
|
||||
if (!ld->on) return EINA_FALSE;
|
||||
|
||||
if (ld->ctxpopup) elm_ctxpopup_dismiss(ld->ctxpopup);
|
||||
|
||||
|
@ -1057,6 +1057,8 @@ live_edit_cancel(void)
|
|||
ld->on = EINA_FALSE;
|
||||
|
||||
tools_live_update(EINA_FALSE);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -699,9 +699,8 @@ keygrabber_key_down_cb(void *data, Evas *e EINA_UNUSED,
|
|||
{
|
||||
if (stats_ctxpopup_dismiss()) return;
|
||||
|
||||
if (live_edit_get())
|
||||
if (live_edit_cancel())
|
||||
{
|
||||
live_edit_cancel();
|
||||
enventor_object_focus_set(ad->enventor, EINA_TRUE);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ static void
|
|||
menu_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
if (live_edit_get()) live_edit_cancel();
|
||||
live_edit_cancel();
|
||||
if (search_is_opened()) search_close();
|
||||
if (goto_is_opened()) tools_goto_update();
|
||||
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
void live_edit_init(Evas_Object *trigger);
|
||||
void live_edit_term(void);
|
||||
void live_edit_toggle(void);
|
||||
void live_edit_cancel(void);
|
||||
Eina_Bool live_edit_cancel(void);
|
||||
Eina_Bool live_edit_get(void);
|
||||
void live_edit_update(void);
|
||||
|
|
Loading…
Reference in New Issue