From 74565cec99d13779bd9691de3dc39090226b1f9c Mon Sep 17 00:00:00 2001 From: Davide Andreoli Date: Mon, 17 Aug 2009 14:26:31 +0000 Subject: [PATCH] * Do not use the 'Font' struct from edje_cc.h SVN revision: 41842 --- legacy/edje/src/lib/edje_edit.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/legacy/edje/src/lib/edje_edit.c b/legacy/edje/src/lib/edje_edit.c index ffbfb9f2cc..56e9e7010c 100644 --- a/legacy/edje/src/lib/edje_edit.c +++ b/legacy/edje/src/lib/edje_edit.c @@ -3235,7 +3235,6 @@ EAPI unsigned char edje_edit_font_add(Evas_Object *obj, const char* path) { char buf[PATH_MAX]; - Font *fn; Edje_Font_Directory_Entry *fnt; Eet_File *eetf; struct stat st; @@ -3261,33 +3260,9 @@ edje_edit_font_add(Evas_Object *obj, const char* path) if (!ed->file->font_dir) return 0; } - /* Create Font */ - fn = _alloc(sizeof(Font)); - if (!fn) return 0; - if ((name = strrchr(path, '/'))) name ++; else name = (char *)path; - fn->file = _strdup(name); - fn->name = _strdup(name); - - /*{ - Eina_List *l; - Font *lfn; - - EINA_LIST_FOREACH(fonts, l, lfn) - { - if (!strcmp(lfn->name, fn->name)) - { - free(fn->file); - free(fn->name); - free(fn); - return; - } - } - } - */ - /* Read font data from file */ f = fopen(path, "rb"); if (f) @@ -3311,7 +3286,7 @@ edje_edit_font_add(Evas_Object *obj, const char* path) fclose(f); } /* Write font to edje file */ - snprintf(buf, sizeof(buf), "fonts/%s", fn->name); + snprintf(buf, sizeof(buf), "fonts/%s", name); if (fdata) { @@ -3343,7 +3318,7 @@ edje_edit_font_add(Evas_Object *obj, const char* path) { fnt = _alloc(sizeof(Edje_Font_Directory_Entry)); if (!fnt) return 0; - fnt->entry = _strdup(fn->name); + fnt->entry = _strdup(name); fnt->path = _strdup(buf); ed->file->font_dir->entries = eina_list_append(ed->file->font_dir->entries, fnt);