Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_theme.c
Log Message:
Allow a theme to specify it's own font path. This is considered relative to
the themes directory, unless preceded with a '/'. If you plan to distribute a
theme, absolute paths are strongly discouraged.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_theme.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- ewl_theme.c 25 Mar 2003 18:36:19 -0000 1.38
+++ ewl_theme.c 26 Mar 2003 05:10:00 -0000 1.39
@@ -91,17 +91,28 @@
*/
void ewl_theme_init_font_path()
{
- char font_path[PATH_LEN];
+ char *font_path;
+ char key[PATH_LEN];
/*
* Setup the default font paths
*/
font_paths = ewd_list_new();
if (font_paths) {
- snprintf(font_path, PATH_LEN, "%s/appearance/fonts",
- theme_path);
+ snprintf(key, PATH_LEN, "/theme/font_path");
+ font_path = ewl_theme_data_get_str(NULL, key);
- ewd_list_append(font_paths, font_path);
+ if (font_path) {
+ if (*font_path == '/')
+ ewd_list_append(font_paths, font_path);
+ else {
+ snprintf(key, PATH_LEN, "%s/%s", theme_path,
+ font_path);
+ ewd_list_append(font_paths, key);
+ }
+
+ FREE(font_path);
+ }
}
}
@@ -244,7 +255,7 @@
printf("%s\n", k);
for (temp = k; temp && !ret; temp = strchr(temp, '/')) {
- if (w->theme)
+ if (w && w->theme)
ret = ewd_hash_get(w->theme, temp);
if (!ret && def_theme_data)
-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs