extra: add a icon if it is installed

This commit is contained in:
Marcel Hollerbach 2016-12-30 19:55:10 +01:00
parent 3d184725b5
commit c67d894cda
1 changed files with 24 additions and 0 deletions

View File

@ -71,6 +71,29 @@ _theme_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *source EIN
return strdup(theme->name);
}
static Evas_Object*
_theme_content_get(void *data, Evas_Object *obj, const char *source)
{
Extra_Theme *theme;
theme = (Extra_Theme *) data;
if (!!strcmp(source, "elm.swallow.end"))
return NULL;
if (extra_theme_installed(theme))
{
Evas_Object *icon;
icon = elm_icon_add(obj);
elm_icon_standard_set(icon, "emblem-favorite");
evas_object_show(icon);
return icon;
}
return NULL;
}
static void
_theme_select(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
@ -310,6 +333,7 @@ extra_win_setup(void)
_theme_class.item_style = "default";
_theme_class.func.text_get = _theme_text_get;
_theme_class.func.content_get = _theme_content_get;
evas_object_show(win);
_win = win;