close ctxpopup when warning popup is shown up.

check whether ctxpopup and close it, if window is moving on to close.

@fix T2996
This commit is contained in:
Hermet Park 2016-01-01 12:11:26 +09:00
parent 100b674f05
commit 8159192a47
2 changed files with 22 additions and 2 deletions

View File

@ -228,7 +228,8 @@ base_gui_init(void)
if ((w > 0) && (w > 0))
evas_object_resize(win, w, h);
evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, win_resize_cb, NULL);
evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, win_resize_cb,
NULL);
evas_object_smart_callback_add(win, "delete,request", win_delete_request_cb,
NULL);
/* evas_object_smart_callback_add(win, "focused", win_focused_cb, NULL);*/

View File

@ -788,6 +788,14 @@ menu_activated_get(void)
return md->active_request;
}
static void
enventor_ctxpopup_dismissed_cb(void *data, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
menu_data *md = data;
warning_open(md, exit_yes_btn_cb, exit_save_btn_cb);
}
void
menu_exit(void)
{
@ -795,7 +803,18 @@ menu_exit(void)
if (enventor_object_modified_get(md->enventor))
{
search_close();
warning_open(md, exit_yes_btn_cb, exit_save_btn_cb);
if (enventor_object_ctxpopup_visible_get(md->enventor))
{
/* bacause the main.c handles the ctxpopup dismissed callback,
here we needs to override the function */
evas_object_smart_callback_priority_add(md->enventor,
"ctxpopup,dismissed", 100,
enventor_ctxpopup_dismissed_cb,
md);
enventor_object_ctxpopup_dismiss(md->enventor);
}
else
warning_open(md, exit_yes_btn_cb, exit_save_btn_cb);
}
else
elm_exit();