using bracket after if to better delimit it. So we know EINA_LIST_FOREACH
is in


2014-04-09 10:35 GMT+02:00 Marcel Hollerbach <[email protected]>:

> bu5hm4n pushed a commit to branch master.
>
>
> http://git.enlightenment.org/misc/entrance.git/commit/?id=c3f817b849f52d85e98d0c7c08ef696a3771efdc
>
> commit c3f817b849f52d85e98d0c7c08ef696a3771efdc
> Author: Marcel Hollerbach <[email protected]>
> Date:   Wed Apr 9 10:28:25 2014 +0200
>
>     entrance: Show "None" if there is no session.
> ---
>  src/bin/entrance_conf_user.c | 24 +++++++++++++++---------
>  1 file changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/src/bin/entrance_conf_user.c b/src/bin/entrance_conf_user.c
> index 12eb1cd..33ce924 100644
> --- a/src/bin/entrance_conf_user.c
> +++ b/src/bin/entrance_conf_user.c
> @@ -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);
>       }
>
>  }
>
> --
>
>
>


-- 
Michaël Bouchaud (yoz) <[email protected]>
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to