static void
_item_unselect(Elm_Toolbar_Item_Data *item)
{
+ /* TIZEN_ONLY(20160418): Add auto selected item feature for navigation style.
if ((!item) || (!item->selected)) return;
+ */
+ Eina_Bool selected;
+
+ if (!item) return;
+
+ selected = item->selected;
+ /* END */
ELM_TOOLBAR_DATA_GET(WIDGET(item), sd);
item->selected = EINA_FALSE;
+ /* TIZEN_ONLY(20160418): Add auto selected item feature for navigation style.
sd->selected_item = NULL;
+ */
+ if (sd->selected_item == EO_OBJ(item))
+ sd->selected_item = NULL;
+ if (sd->auto_selected_last_item == EO_OBJ(item))
+ sd->auto_selected_last_item = NULL;
+ /* END */
elm_layout_signal_emit(VIEW(item), "elm,state,unselected", "elm");
if (item->icon)
elm_widget_signal_emit(item->icon, "elm,state,unselected", "elm");
+ /* TIZEN_ONLY(20160418): Add auto selected item feature for navigation style.
eo_do(WIDGET(item), eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_UNSELECTED, EO_OBJ(item)));
if (_elm_config->atspi_mode)
elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(item), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
+ */
+ if (selected)
+ {
+ eo_do(WIDGET(item), eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_UNSELECTED, EO_OBJ(item)));
+ if (_elm_config->atspi_mode)
+ elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(item), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
+ }
+ /* END */
}
static void
Elm_Object_Item *eo_it2 = elm_toolbar_selected_item_get(WIDGET(it));
ELM_TOOLBAR_ITEM_DATA_GET(eo_it2, it2);
_item_unselect(it2);
+ /* TIZEN_ONLY(20160418): Add auto selected item feature for navigation style. */
+ if (sd->auto_selected_last_item)
+ {
+ ELM_TOOLBAR_ITEM_DATA_GET(sd->auto_selected_last_item, it3);
+ _item_unselect(it3);
+ }
+ /* END */
it->selected = EINA_TRUE;
sd->selected_item = EO_OBJ(it);
}
}
+ /* TIZEN_ONLY(20160418): Add auto selected item feature for navigation style. */
+ if ((sd->selected_item != EO_OBJ(last_it)) &&
+ (sd->auto_selected_last_item != EO_OBJ(last_it)))
+ {
+ if (sd->auto_selected_last_item &&
+ sd->auto_selected_last_item != sd->selected_item)
+ {
+ ELM_TOOLBAR_ITEM_DATA_GET(sd->auto_selected_last_item, it2);
+
+ _item_unselect(it2);
+ }
+
+ sd->auto_selected_last_item = EO_OBJ(last_it);
+ }
+ /* END */
+
eina_list_free(list);
}
Eina_Inlist *items;
Elm_Toolbar_Item_Data *more_item;
Elm_Object_Item *selected_item; /**< a selected item by mouse click, return key, api, and etc. */
+ /* TIZEN_ONLY(20160418): Add auto selected item feature for navigation style. */
+ Elm_Object_Item *auto_selected_last_item; /**< a automatically selected item by its order. */
+ /* END */
Elm_Object_Item *focused_item; /**< a focused item by keypad arrow or mouse. This is set to NULL if widget looses focus. */
Elm_Object_Item *last_focused_item; /**< This records the last focused item when widget looses focus. This is required to set the focus on last focused item when widgets gets focus. */
Elm_Toolbar_Item_Data *reorder_empty, *reorder_item;