Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/etox

Dir     : e17/libs/etox/src


Modified Files:
        etox.c 


Log Message:
We need to add the etox font path to each evas, but don't repeatedly add it
for every etox on the evas.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/src/etox.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -3 -r1.105 -r1.106
--- etox.c      29 Nov 2004 19:51:14 -0000      1.105
+++ etox.c      7 Dec 2004 02:52:23 -0000       1.106
@@ -23,11 +23,28 @@
 Evas_Object *etox_new(Evas *evas)
 {
        Etox *et;
+       const Evas_List *font_paths;
+       int path_found = 0;
 
        CHECK_PARAM_POINTER_RETURN("evas", evas, NULL);
 
-       if (!etox_smart) {
+       font_paths = evas_font_path_list(evas);
+       while (font_paths) {
+               char buf[PATH_MAX];
+               char *path = font_paths->data;
+
+               strncpy(buf, PACKAGE_DATA_DIR "/fonts", PATH_MAX);
+               if (!strcmp(path, buf)) {
+                       path_found = 1;
+                       break;
+               }
+
+               font_paths = font_paths->next;
+       }
+
+       if (!path_found)
                evas_font_path_append(evas, PACKAGE_DATA_DIR "/fonts");
+       if (!etox_smart) {
                etox_smart = evas_smart_new("etox_smart", NULL, etox_free,
                                etox_set_layer, NULL, NULL, NULL, NULL,
                                etox_move, etox_resize, etox_show, etox_hide,




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to