Welcome: Don't Pop Naviframe.
This fixes the annoying "feature" where pressing "Escape" in the EDI wizard will remove all content from the window.
This commit is contained in:
parent
036773e57f
commit
9f834e35bb
|
@ -899,6 +899,12 @@ _edi_welcome_button_create(const char *title, const char *icon_name,
|
||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_naviframe_pop_stop_nop_cb(void *data EINA_UNUSED, Elm_Object_Item *it EINA_UNUSED)
|
||||||
|
{
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
Evas_Object *edi_welcome_show()
|
Evas_Object *edi_welcome_show()
|
||||||
{
|
{
|
||||||
Evas_Object *win, *hbx, *box, *button, *frame, *image, *naviframe;
|
Evas_Object *win, *hbx, *box, *button, *frame, *image, *naviframe;
|
||||||
|
@ -918,6 +924,7 @@ Evas_Object *edi_welcome_show()
|
||||||
evas_object_show(naviframe);
|
evas_object_show(naviframe);
|
||||||
_welcome_naviframe = naviframe;
|
_welcome_naviframe = naviframe;
|
||||||
|
|
||||||
|
|
||||||
hbx = elm_box_add(naviframe);
|
hbx = elm_box_add(naviframe);
|
||||||
elm_box_horizontal_set(hbx, EINA_TRUE);
|
elm_box_horizontal_set(hbx, EINA_TRUE);
|
||||||
evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
@ -975,6 +982,12 @@ Evas_Object *edi_welcome_show()
|
||||||
hbx,
|
hbx,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
/* This prevents us losing the content when popping last item from the
|
||||||
|
* naviframe.
|
||||||
|
*/
|
||||||
|
item = elm_naviframe_top_item_get(naviframe);
|
||||||
|
elm_naviframe_item_pop_cb_set(item, _naviframe_pop_stop_nop_cb, NULL);
|
||||||
|
|
||||||
elm_naviframe_item_title_enabled_set(item, EINA_FALSE, EINA_FALSE);
|
elm_naviframe_item_title_enabled_set(item, EINA_FALSE, EINA_FALSE);
|
||||||
evas_object_resize(win, ELM_SCALE_SIZE(480), ELM_SCALE_SIZE(260));
|
evas_object_resize(win, ELM_SCALE_SIZE(480), ELM_SCALE_SIZE(260));
|
||||||
elm_win_center(win, EINA_TRUE, EINA_TRUE);
|
elm_win_center(win, EINA_TRUE, EINA_TRUE);
|
||||||
|
|
Loading…
Reference in New Issue