[prev in list] [next in list] [prev in thread] [next in thread] 

List:       enlightenment-devel
Subject:    Re: [E-devel] E SVN: jackdanielz trunk/clouseau/src/bin
From:       Daniel Juyung Seo <seojuyung2 () gmail ! com>
Date:       2013-02-26 8:23:29
Message-ID: CAKco4M6OAbry9AchwdTXitb-qD71zEHmewnr+u1FUexbMtbdcw () mail ! gmail ! com
[Download RAW message or body]

Awesomeness!!
I like this change.
Now clouseau is much more usable like before.
Thanks.

Daniel Juyung Seo (SeoZ)

On Tue, Feb 26, 2013 at 3:29 PM, Enlightenment SVN
<no-reply@enlightenment.org> wrote:
> Log:
> Clouseau: Merge list elements into one line
> 
> This change only affects the clouseau_client appearance.
> The merge is done if there are only basic types into the list (i.e no
> other lists).
> This has been done to be backward compatible with the previous client
> displaying way.
> 
> Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com>
> 
> Author:       jackdanielz
> Date:         2013-02-25 22:29:30 -0800 (Mon, 25 Feb 2013)
> New Revision: 84373
> Trac:         http://trac.enlightenment.org/e/changeset/84373
> 
> Modified:
> trunk/clouseau/src/bin/clouseau_client.c
> 
> Modified: trunk/clouseau/src/bin/clouseau_client.c
> ===================================================================
> --- trunk/clouseau/src/bin/clouseau_client.c    2013-02-26 01:23:40 UTC (rev 84372)
> +++ trunk/clouseau/src/bin/clouseau_client.c    2013-02-26 06:29:30 UTC (rev 84373)
> @@ -1759,6 +1759,39 @@
> }
> 
> static void
> +_obj_info_compactable_list_to_buffer(Eo_Dbg_Info *root_eo, char* buffer, unsigned \
> int buffer_size) +{
> +   Eina_List *l; // Iterator
> +   Eina_Value_List list; // list of the elements in root_eo
> +   eina_value_pget(&(root_eo->value), &list);
> +   Eo_Dbg_Info *eo; // List element
> +   buffer += snprintf(buffer, buffer_size, "%s:", root_eo->name);
> +   EINA_LIST_FOREACH(list.list, l, eo)
> +     {
> +        char *strval = eina_value_to_string(&(eo->value));
> +        buffer += snprintf(buffer, buffer_size, "   %s: %s", eo->name, strval);
> +        free(strval);
> +     }
> +}
> +
> +static Eina_Bool
> +_obj_info_can_list_be_compacted(Eo_Dbg_Info *root_eo)
> +{
> +   Eina_List *l; // Iterator
> +   Eina_Value_List list; // list of the elements in root_eo
> +   Eo_Dbg_Info *eo; // List element
> +   eina_value_pget(&(root_eo->value), &list);
> +   // We check that there is no list into this list. If such list exists,
> +   // we can't compact the list.
> +   EINA_LIST_FOREACH(list.list, l, eo)
> +     {
> +        if (eina_value_type_get(&(eo->value)) == EINA_VALUE_TYPE_LIST)
> +           return EINA_FALSE;
> +     }
> +   return EINA_TRUE;
> +}
> +
> +static void
> _obj_info_gl_selected(void *data EINA_UNUSED, Evas_Object *pobj EINA_UNUSED,
> void *event_info EINA_UNUSED)
> {
> @@ -1780,8 +1813,12 @@
> 
> EINA_LIST_FOREACH(eo_list.list, l, eo)
> {
> -             Elm_Genlist_Item_Type iflag = (eina_value_type_get(&(eo->value)) == \
>                 EINA_VALUE_TYPE_LIST) ?
> -                ELM_GENLIST_ITEM_TREE : ELM_GENLIST_ITEM_NONE;
> +             Elm_Genlist_Item_Type iflag = ELM_GENLIST_ITEM_NONE;
> +             if (eina_value_type_get(&(eo->value)) == EINA_VALUE_TYPE_LIST)
> +               {
> +                  if (!_obj_info_can_list_be_compacted(eo))
> +                     iflag = ELM_GENLIST_ITEM_TREE;
> +               }
> elm_genlist_item_append(prop_list, &_obj_info_itc, eo, glit,
> iflag, _obj_info_gl_selected, NULL);
> }
> @@ -1824,7 +1861,10 @@
> char buf[1024] = "";
> if (eina_value_type_get(&(eo->value)) == EINA_VALUE_TYPE_LIST)
> {
> -        return strdup(eo->name);
> +        if (_obj_info_can_list_be_compacted(eo))
> +           _obj_info_compactable_list_to_buffer(eo, buf, sizeof(buf));
> +        else
> +           snprintf(buf, sizeof(buf), "%s", eo->name);
> }
> else
> {
> 
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-svn@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic