Allow modules to use their own icons as config items/cats.
SVN revision: 32235
This commit is contained in:
parent
44fc6bc933
commit
eedab4732c
|
@ -278,10 +278,15 @@ _e_configure_category_add(E_Configure *eco, const char *label, const char *icon)
|
|||
cat->eco = eco;
|
||||
cat->label = evas_stringshare_add(label);
|
||||
if (icon)
|
||||
{
|
||||
if (e_util_edje_icon_check(icon))
|
||||
{
|
||||
o = edje_object_add(eco->evas);
|
||||
e_util_edje_icon_set(o, icon);
|
||||
}
|
||||
else
|
||||
o = e_util_icon_add(icon, eco->evas);
|
||||
}
|
||||
eco->cats = evas_list_append(eco->cats, cat);
|
||||
|
||||
e_widget_ilist_append(eco->cat_list, o, label, _e_configure_category_cb, cat, NULL);
|
||||
|
@ -313,10 +318,15 @@ _e_configure_category_cb(void *data)
|
|||
ci = l->data;
|
||||
if (!ci) continue;
|
||||
if (ci->icon)
|
||||
{
|
||||
if (e_util_edje_icon_check(ci->icon))
|
||||
{
|
||||
o = edje_object_add(eco->evas);
|
||||
e_util_edje_icon_set(o, ci->icon);
|
||||
}
|
||||
else
|
||||
o = e_util_icon_add(ci->icon, eco->evas);
|
||||
}
|
||||
e_widget_ilist_append(eco->item_list, o, ci->label, _e_configure_item_cb, ci, NULL);
|
||||
}
|
||||
e_widget_ilist_go(eco->item_list);
|
||||
|
|
Loading…
Reference in New Issue