From: seoz Date: Thu, 8 Mar 2012 04:19:06 +0000 (+0000) Subject: elm genlist: Fixed API bug. API change introduced API bug. X-Git-Tag: REL_F_I9500_20120323_1~17^2~161 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ddf6aeeed856bb6f0ea80957162ff6bb5ac4be3;p=framework%2Fuifw%2Felementary.git elm genlist: Fixed API bug. API change introduced API bug. Signed-off-by: Daniel Juyung Seo git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69037 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 973b381..668982d 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -5489,12 +5489,11 @@ elm_genlist_item_decorate_mode_set(Elm_Object_Item *it, } EAPI const char * -elm_genlist_item_decorate_mode_get(const Evas_Object *obj) +elm_genlist_item_decorate_mode_get(const Elm_Object_Item *it) { - ELM_CHECK_WIDTYPE(obj, widtype) NULL; - Widget_Data *wd = elm_widget_data_get(obj); - if (!wd) return NULL; - return wd->mode_type; + ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL); + Elm_Gen_Item *_it = (Elm_Gen_Item *)it; + return _it->wd->mode_type; } EAPI const Elm_Object_Item * diff --git a/src/lib/elm_genlist.h b/src/lib/elm_genlist.h index 31000d7..6a30502 100644 --- a/src/lib/elm_genlist.h +++ b/src/lib/elm_genlist.h @@ -1602,19 +1602,18 @@ EAPI void elm_genlist_item_fields_update(Elm_Object_Ite EAPI void elm_genlist_item_decorate_mode_set(Elm_Object_Item *it, const char *mode_type, Eina_Bool mode_set); /** - * Get the last (or current) genlist mode used. + * Get the item's decorate mode. * * @param obj The genlist object * - * This function just returns the name of the last used genlist mode. It will - * be the current mode if it's still active. + * This function just returns the name of the item's decorate mode. * * @see elm_genlist_item_decorate_mode_set() * @see elm_genlist_decorated_item_get() * * @ingroup Genlist */ -EAPI const char *elm_genlist_item_decorate_mode_get(const Evas_Object *obj); +EAPI const char *elm_genlist_item_decorate_mode_get(const Elm_Object_Item *it); /** * Get active genlist mode item