entrance: Show "None" if there is no session.

This commit is contained in:
Marcel Hollerbach 2014-04-09 10:28:25 +02:00
parent 1a0e7a59da
commit c3f817b849
1 changed files with 15 additions and 9 deletions

View File

@ -110,14 +110,20 @@ _entrance_conf_session_update(Evas_Object *session_sel)
sessions = entrance_gui_xsessions_get();
//search the correct struct
elm_object_text_set(session_sel, _entrance_int_conf_user->lsess);
EINA_LIST_FOREACH(sessions, node, session)
{
if (!strcmp(_entrance_int_conf_user->lsess,session->name))
{
icon = session->icon;
}
}
if (_entrance_int_conf_user->lsess)
elm_object_text_set(session_sel, _entrance_int_conf_user->lsess);
else
elm_object_text_set(session_sel, "None");
if (_entrance_int_conf_user->lsess)
EINA_LIST_FOREACH(sessions, node, session)
{
if ((_entrance_int_conf_user->lsess) &&
!strcmp(_entrance_int_conf_user->lsess,session->name))
{
icon = session->icon;
}
}
//create the icon
ic = elm_object_part_content_get(session_sel, "icon");
if (icon)
@ -131,7 +137,7 @@ _entrance_conf_session_update(Evas_Object *session_sel)
{
if (ic)
evas_object_del(ic);
elm_object_part_content_set(ic, "icon", NULL);
elm_object_part_content_set(session_sel, "icon", NULL);
}
}