Fixing return of edje_edit_fonts_list_get

The fuction was returning a private type (as
_Edje_Font_Directory_Entry) and an EAPI should *never*
return and private type.

By Fabiano Fidencio



SVN revision: 51615
This commit is contained in:
Iván Briano 2010-08-24 14:36:07 +00:00
parent 42b3ccd05a
commit cf45f61885
1 changed files with 18 additions and 15 deletions

View File

@ -3935,7 +3935,7 @@ edje_edit_fonts_list_get(Evas_Object *obj)
if (!it) return NULL;
EINA_ITERATOR_FOREACH(it, f)
fonts = eina_list_append(fonts, f);
fonts = eina_list_append(fonts, eina_stringshare_add(f->entry));
eina_iterator_free(it);
@ -6049,8 +6049,10 @@ _edje_generate_source(Evas_Object *obj)
Eina_Strbuf *buf;
Eina_List *l, *ll;
char *entry;
Eina_Iterator *it;
Edje_Font_Directory_Entry *fnt;
char *entry;
Eina_Bool ret = EINA_TRUE;
GET_ED_OR_RETURN(NULL);
@ -6097,23 +6099,24 @@ _edje_generate_source(Evas_Object *obj)
}
/* Fonts */
if ((ll = edje_edit_fonts_list_get(obj)))
it = eina_hash_iterator_data_new(ed->file->fonts);
if (it)
{
BUF_APPEND(I0"fonts {\n");
BUF_APPEND(I0"fonts {\n");
EINA_LIST_FOREACH(ll, l, fnt)
BUF_APPENDF(I1"font: \"%s\" \"%s\";\n", fnt->file,
fnt->entry);
EINA_ITERATOR_FOREACH(it, fnt)
BUF_APPENDF(I1"font: \"%s\" \"%s\";\n", fnt->file,
fnt->entry);
BUF_APPEND(I0"}\n\n");
eina_list_free(ll);
BUF_APPEND(I0"}\n\n");
eina_list_free(ll);
if (!ret)
{
ERR("Generating EDC for Fonts");
eina_strbuf_free(buf);
return NULL;
}
if (!ret)
{
ERR("Generating EDC for Fonts");
eina_strbuf_free(buf);
return NULL;
}
}
/* Data */