aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bin/e_ilist.c14
-rw-r--r--src/bin/e_ilist.h1
2 files changed, 10 insertions, 5 deletions
diff --git a/src/bin/e_ilist.c b/src/bin/e_ilist.c
index 8f23d69fd..e1ac1f9f1 100644
--- a/src/bin/e_ilist.c
+++ b/src/bin/e_ilist.c
@@ -497,6 +497,14 @@ e_ilist_nth_label_get(Evas_Object *obj, int n)
}
EAPI void
+e_ilist_item_label_set(E_Ilist_Item *si, const char *label)
+{
+ EINA_SAFETY_ON_NULL_RETURN(si);
+ eina_stringshare_replace(&si->label, label);
+ edje_object_part_text_set(si->o_base, "e.text.label", label);
+}
+
+EAPI void
e_ilist_nth_label_set(Evas_Object *obj, int n, const char *label)
{
E_Ilist_Item *si = NULL;
@@ -507,11 +515,7 @@ e_ilist_nth_label_set(Evas_Object *obj, int n, const char *label)
API_ENTRY return;
if (!sd->items) return;
si = eina_list_nth(sd->items, n);
- if (si)
- {
- if (eina_stringshare_replace(&si->label, label))
- edje_object_part_text_set(si->o_base, "e.text.label", label);
- }
+ if (si) e_ilist_item_label_set(si, label);
}
EAPI Evas_Object *
diff --git a/src/bin/e_ilist.h b/src/bin/e_ilist.h
index b97ca57ca..42b146531 100644
--- a/src/bin/e_ilist.h
+++ b/src/bin/e_ilist.h
@@ -60,6 +60,7 @@ EAPI void e_ilist_icon_size_set (Evas_Object *obj, Evas_Coord w,
EAPI const Eina_List *e_ilist_items_get (Evas_Object *obj);
EAPI void e_ilist_multi_select (Evas_Object *obj, int n);
EAPI void e_ilist_range_select (Evas_Object *obj, int n);
+EAPI void e_ilist_item_label_set(E_Ilist_Item *si, const char *label);
EAPI Eina_Bool e_ilist_custom_edje_file_set(Evas_Object *obj, const char *file, const char *group);
#endif
#endif