From 402dce1b0d30958952bf15258afaed3592967fca Mon Sep 17 00:00:00 2001 From: Davide Andreoli Date: Wed, 12 Aug 2009 11:18:08 +0000 Subject: [PATCH] * add another _label_get() function This also fix ticket #294 on trac :) SVN revision: 41700 --- src/lib/Elementary.h.in | 1 + src/lib/elc_hoversel.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 05a0ae4..7dafce8 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -528,6 +528,7 @@ extern "C" { EAPI Elm_Hoversel_Item *elm_hoversel_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data); EAPI void elm_hoversel_item_del(Elm_Hoversel_Item *item); EAPI void *elm_hoversel_item_data_get(Elm_Hoversel_Item *it); + EAPI const char *elm_hoversel_item_label_get(Elm_Hoversel_Item *it); /* smart callbacks called: * "clicked" - the user clicked the hoversel button and popped up the sel * "selected" - an item in the hoversel list is selected diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 93bc41d..8eb73a4 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -390,3 +390,20 @@ elm_hoversel_item_data_get(Elm_Hoversel_Item *it) if (!it) return NULL; return it->data; } + +/** + * Get the text label of an hoversel item + * + * This returns the text of the label of the given hoversel item + * + * @param it The item to get the label + * @return The text label of the hoversel item + * + * @ingroup Hoversel + */ +EAPI const char * +elm_hoversel_item_label_get(Elm_Hoversel_Item *it) +{ + if (!it) return NULL; + return it->label; +} -- 2.7.4