elementary/naviframe - fix the naviframe to recover the focus when top item is deleted

This commit is contained in:
ChunEon Park 2013-06-05 16:31:49 +09:00
parent 4ec80b4e9f
commit bfc63634c1
3 changed files with 24 additions and 7 deletions

View File

@ -1374,13 +1374,19 @@
* Add ELM_INPUT_PANEL_LAYOUT_DATETIME.
2013-05-27 Seunggyun Kim
* Add elm_config_glayer_long_tap_start_timeout_set/get,
elm_config_glayer_double_tap_timeout_set/get
2013-05-30 ChunEon Park
* Fix the mapbuf to be enabled before it's content is entirely rendered
once.
2013-06-05 Ryuan Choi (ryuan)
* Fix elm_colorselector does not update color bar when picker changed color.
2013-06-05 ChunEon Park (Hermet)
* Fix navifame to recover the focus for the prev page when top item is deleted.

View File

@ -237,6 +237,7 @@ Fixes:
* Fix elm_colorselector does not emit "changed" when clicked color palatte.
* Fix elm_mapbuf to be enabled before it's content is entirely rendered once. this will reduce the cases that content is not updated in the screen.
* Fix elm_colorselector does not update color bar when picker changed color.
* Fix navifame to recover the focus for the prev page when top item is deleted.
Removals:

View File

@ -33,6 +33,19 @@ static const char SIG_CLICKED[] = "clicked";
static void _on_item_back_btn_clicked(void *data, Evas_Object *obj, void *event_info __UNUSED__);
static void
_prev_page_focus_recover(Elm_Naviframe_Item *it)
{
Evas_Object *newest;
unsigned int order;
newest = elm_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE);
if (newest)
elm_object_focus_set(newest, EINA_TRUE);
else
elm_object_focus_set(VIEW(it), EINA_TRUE);
}
static void
_elm_naviframe_smart_translate(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
{
@ -449,6 +462,7 @@ _item_del_pre_hook(Elm_Object_Item *it)
if (evas_object_data_get(VIEW(nit), "out_of_list"))
goto end;
//FIXME: Really need?
if (!sd->on_deletion)
{
nit->unfocusable = elm_widget_tree_unfocusable_get(VIEW(nit));
@ -473,6 +487,8 @@ _item_del_pre_hook(Elm_Object_Item *it)
evas_object_show(VIEW(prev_it));
evas_object_raise(VIEW(prev_it));
_prev_page_focus_recover(prev_it);
elm_object_signal_emit(VIEW(prev_it), "elm,state,visible", "elm");
}
@ -1041,8 +1057,6 @@ _on_item_show_finished(void *data,
const char *source __UNUSED__)
{
Elm_Naviframe_Item *it = data;
unsigned int order = 0;
Evas_Object *newest;
ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd);
@ -1050,11 +1064,7 @@ _on_item_show_finished(void *data,
elm_widget_tree_unfocusable_set(VIEW(it), it->unfocusable);
newest = elm_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE);
if (newest)
elm_object_focus_set(newest, EINA_TRUE);
else
elm_object_focus_set(VIEW(it), EINA_TRUE);
_prev_page_focus_recover(it);
if (sd->freeze_events)
evas_object_freeze_events_set(VIEW(it), EINA_FALSE);