Commit acccc8ee authored by Ludovic Fauvet's avatar Ludovic Fauvet

sidebar: select the current view (on back press)

parent 93058c36
......@@ -259,6 +259,7 @@ intf_pop_view(interface *intf)
if (view)
{
intf->current_view = view->i_type;
sidebar_set_selected_view(intf->sidebar, intf->current_view);
if (view->pf_has_menu && view->pf_has_menu(view->p_view_sys) == true)
{
......
......@@ -215,6 +215,10 @@ void
sidebar_set_selected_view(sidebar *sb, view_e view_type)
{
elm_genlist_item_selected_set(elm_genlist_nth_item_get(sb->sidebar_genlist, view_type), EINA_TRUE);
// For an unknown reason, elm_genlist_item_selected_set unhide its parent object
// so we have to hide it again manually.
elm_panel_hidden_set(sb->sidebar_panel, EINA_TRUE);
}
Evas_Object*
......
......@@ -37,4 +37,7 @@ create_sidebar(interface *intf, Evas_Object *layout, view_e view_type);
Evas_Object*
sidebar_get_widget(sidebar *sb);
void
sidebar_set_selected_view(sidebar *sb, view_e view_type);
#endif /* PANEL_GENLIST_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment