Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_misc.c ewl_theme.c ewl_theme.h 


Log Message:
added ewl_theme_shutdown() as a counterpart to ewl_theme_init(). fixed another 
possible problem where a string would be inserted into a list and freed afterwards
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- ewl_misc.c  3 Feb 2004 19:54:02 -0000       1.58
+++ ewl_misc.c  4 Feb 2004 18:30:32 -0000       1.59
@@ -118,6 +118,7 @@
 
        ecore_timer_del(config_timer);
        ewl_callbacks_deinit();
+       ewl_theme_shutdown();
 
        ewd_list_destroy(configure_list);
        ewd_list_destroy(realize_list);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_theme.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- ewl_theme.c 3 Feb 2004 19:55:26 -0000       1.55
+++ ewl_theme.c 4 Feb 2004 18:30:33 -0000       1.56
@@ -140,6 +140,29 @@
        DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
+void ewl_theme_shutdown()
+{
+       char *data;
+
+       if (theme_db) {
+               e_db_close(theme_db);
+               theme_db = NULL;
+       }
+
+       if (font_paths) {
+               while ((data = ewd_list_remove_first(font_paths)))
+                       free(data);
+               
+               ewd_list_destroy(font_paths);
+               font_paths = NULL;
+       }
+
+       if (def_theme_data) {
+               ewd_hash_destroy(def_theme_data);
+               def_theme_data = NULL;
+       }
+}
+
 /*
  * Initializes the font path based on the theme. Also called by ewl_init, and
  * is not recommended to be called separately.
@@ -164,9 +187,10 @@
                                snprintf(key, PATH_MAX, "%s/%s", theme_path,
                                                font_path);
                                ewd_list_append(font_paths, strdup(key));
+
+                               FREE(font_path);
                        }
 
-                       FREE(font_path);
                }
        }
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_theme.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- ewl_theme.h 27 Jan 2004 06:08:35 -0000      1.20
+++ ewl_theme.h 4 Feb 2004 18:30:34 -0000       1.21
@@ -11,6 +11,7 @@
  */
 
 int             ewl_theme_init(void);
+void            ewl_theme_shutdown(void);
 int             ewl_theme_init_widget(Ewl_Widget * w);
 void            ewl_theme_deinit_widget(Ewl_Widget * w);
 char           *ewl_theme_path(void);




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to