Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_misc.c ewl_theme.c
Log Message:
- the ewl_init code was double decrementing the init count if one of the ewl_*
pieces failed to init. this
would cause ewl_init to return -1 instead of 0
- if a theme was passed on the cmd line it wouldn't be used as the theme_path
was never set, would always be
over-ridden by default theme
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_misc.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_misc.c 22 Mar 2005 16:36:35 -0000 1.5
+++ ewl_misc.c 28 Mar 2005 04:18:46 -0000 1.6
@@ -87,6 +87,8 @@
{
DENTER_FUNCTION(DLEVEL_STABLE);
+
+
/* check if we are already initialized */
if (++_ewl_init_count > 1)
DRETURN_INT(_ewl_init_count, DLEVEL_STABLE);
@@ -94,12 +96,12 @@
ewl_init_parse_options(argc, argv);
if (!ecore_init()) {
- DERROR("Could not init ecore....");
+ DERROR("Could not init ecore....\n");
DRETURN_INT(--_ewl_init_count, DLEVEL_STABLE);
}
if (!edje_init()) {
- DERROR("Could not init edje....");
+ DERROR("Could not init edje....\n");
ecore_shutdown();
DRETURN_INT(--_ewl_init_count, DLEVEL_STABLE);
}
@@ -140,13 +142,13 @@
if (!use_engine) {
fprintf(stderr, "Cannot open display!\n");
ewl_shutdown();
- DRETURN_INT(--_ewl_init_count, DLEVEL_STABLE);
+ DRETURN_INT(_ewl_init_count, DLEVEL_STABLE);
}
if (!ewl_config_init()) {
- DERROR("Could not init config data.");
+ DERROR("Could not init config data.\n");
ewl_shutdown();
- DRETURN_INT(--_ewl_init_count, DLEVEL_STABLE);
+ DRETURN_INT(_ewl_init_count, DLEVEL_STABLE);
}
if (print_theme_keys)
@@ -158,17 +160,16 @@
}
if (!ewl_ev_init()) {
- DERROR("Could not init event data.");
+ DERROR("Could not init event data.\n");
ewl_shutdown();
- DRETURN_INT(--_ewl_init_count, DLEVEL_STABLE);
+ DRETURN_INT(_ewl_init_count, DLEVEL_STABLE);
}
ewl_callbacks_init();
if (!ewl_theme_init()) {
- DERROR("Could not init theme data.");
ewl_shutdown();
- DRETURN_INT(--_ewl_init_count, DLEVEL_STABLE);
+ DRETURN_INT(_ewl_init_count, DLEVEL_STABLE);
}
ewl_embed_list = ecore_list_new();
@@ -201,8 +202,10 @@
ecore_list_destroy(free_evas_list);
ecore_list_destroy(free_evas_object_list);
ecore_list_destroy(child_add_list);
- ecore_list_destroy(ewl_embed_list);
- ecore_list_destroy(ewl_window_list);
+ if (ewl_embed_list)
+ ecore_list_destroy(ewl_embed_list);
+ if (ewl_window_list)
+ ecore_list_destroy(ewl_window_list);
edje_shutdown();
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_theme.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_theme.c 22 Mar 2005 20:58:17 -0000 1.5
+++ ewl_theme.c 28 Mar 2005 04:18:46 -0000 1.6
@@ -41,7 +41,8 @@
theme_name = strdup(ewl_config.theme.name);
theme_path = ewl_theme_path_find(theme_name);
}
- }
+ } else
+ theme_path = ewl_theme_path_find(theme_name);
/*
* Fall back to the default theme.
@@ -55,7 +56,7 @@
* If we can't find a theme, no point in continuing further.
*/
if (!theme_path) {
- DERROR("No usable theme found, exiting EWL");
+ fprintf(stderr, "No usable theme found, exiting EWL\n");
DRETURN_INT(FALSE, DLEVEL_STABLE);
}
@@ -134,9 +135,7 @@
theme_found_path = strdup(theme_tmp_path);
}
}
-
return theme_found_path;
-
}
/**
-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs