Hello,

We made group title in genlist. 
And the API "elm_genlist_item_append_with_group" is used when item is appended 
in group.
But I want to use the same API when normal item, child item and the member item 
of the group are appended.
So I changed the code of the API "elm_genlist_item_append" such as following 
psuedo-code.
Please review and advise.

==============================================================================================================================
elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc,
                        const void *data, Elm_Genlist_Item *parent,
                        Elm_Genlist_Item_Flags flags,
                        Evas_Smart_Cb func, const void *func_data)
{
   ...
   if (!it->parent)
     {
          append normal item
     }
   else
     {
        if(it->parent->type == ELM_GENLIST_ITEM_TYPE_ITEM)
          {
                append child item of the parent
          }
        else if(it->parent->type == ELM_GENLIST_ITEM_TYPE_GROUP)
          {
                append member item of the parent(group)
          }
     }
     ...
     return it;
}
==============================================================================================================================

If the upper psuedo-code don't have the issue, please review the another 
psuedo-code about the API "elm_genlist_item_insert_before".
The following is it.
But it has a issue.
In case of "insert", there is not the parameter of the parent.
So I set the parent of the given item"before" to the parent of the new item.
As a result, child item and member item of the group can be inserted before the 
given item "before"
But I don't know how to do, If "before" has the parent(parent is group) and I 
want to insert the normal item(not child item or member item of the group) 
before the given item "before".
In other words, If "before" has the parent, new item will have the parent and 
it should be one of the two(child item or member item).
If "before" has the parent, the new item can't become normal item.

Please think about this issue.

==============================================================================================================================
EAPI Elm_Genlist_Item *
elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class 
*itc,
                               const void *data, Elm_Genlist_Item *before,
                               Elm_Genlist_Item_Flags flags,
                               Evas_Smart_Cb func, const void *func_data)
{
   ...
   Set before->parent to  it->parent
   if (!it->parent)
      insert nomal item before the given item "before".
   else
     {
        if(it->parent->type == ELM_GENLIST_ITEM_TYPE_ITEM)
          {
              insert child item of the parent before the given item "before".
          }
        else if(it->parent->type == ELM_GENLIST_ITEM_TYPE_GROUP)
          {
              insert member item of the parent(group) before the given item 
"before".
          }
     }
   ...
   return it;
}
==============================================================================================================================
------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to