From: Enlightenment S. <no-...@en...> - 2010-07-01 23:48:17
|
Log: Elm_List separator support. By: Leandro "acidx" Pereira <le...@pr...> Author: barbieri Date: 2010-07-01 16:48:10 -0700 (Thu, 01 Jul 2010) New Revision: 49981 Modified: trunk/TMP/st/elementary/src/lib/elm_list.c Modified: trunk/TMP/st/elementary/src/lib/elm_list.c =================================================================== --- trunk/TMP/st/elementary/src/lib/elm_list.c 2010-07-01 23:00:37 UTC (rev 49980) +++ trunk/TMP/st/elementary/src/lib/elm_list.c 2010-07-01 23:48:10 UTC (rev 49981) @@ -38,6 +38,7 @@ Eina_Bool deleted : 1; Eina_Bool even : 1; Eina_Bool is_even : 1; + Eina_Bool is_separator : 1; Eina_Bool fixed : 1; Eina_Bool selected : 1; Eina_Bool hilighted : 1; @@ -565,7 +566,9 @@ { const char *stacking; - if (wd->mode == ELM_LIST_COMPRESS) + if (it->is_separator) + _elm_theme_object_set(obj, it->base, "list", "separator", style); + else if (wd->mode == ELM_LIST_COMPRESS) { if (it->even) _elm_theme_object_set(obj, it->base, "list", "item_compress", style); @@ -1141,6 +1144,32 @@ } /** + * Sets if item is a separator. + * + * @param it The list item object + * @param setting + */ +EAPI void +elm_list_item_separator_set(Elm_List_Item *it, Eina_Bool setting) +{ + ELM_LIST_ITEM_CHECK_DELETED_RETURN(it); + it->is_separator = setting; +} + +/** + * Returns EINA_TRUE if Elm_List_Item is a separator. + * + * @param it The list item object + */ +EAPI Eina_Bool +elm_list_item_separator_get(Elm_List_Item *it) +{ + ELM_LIST_ITEM_CHECK_DELETED_RETURN(it); + return it->is_separator; +} + + +/** * Sets the selected state of @p it. * * @param it The list item |