Enlightenment CVS committal Author : barbieri Project : e17 Module : libs/epsilon
Dir : e17/libs/epsilon/src/lib Modified Files: Epsilon.c Epsilon.h epsilon_thumb.c Log Message: Set thumb_size before asking for thumb_file (dest), remove unused methods from header, add return to epsilon_init() =================================================================== RCS file: /cvs/e/e17/libs/epsilon/src/lib/Epsilon.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -3 -r1.38 -r1.39 --- Epsilon.c 23 Oct 2007 22:04:53 -0000 1.38 +++ Epsilon.c 30 Oct 2007 23:59:31 -0000 1.39 @@ -124,18 +124,20 @@ return plugin; } -EAPI void +static int epsilon_init_count = 0; +EAPI int epsilon_init (void) { char buf[PATH_MAX]; int base_len; char *home; + struct dirent *de; + char* type; + DIR *dir; + Epsilon_Plugin *plugin; + char plugin_path[1024]; - struct dirent *de; - char* type; - DIR *dir; - Epsilon_Plugin *plugin; - char plugin_path[1024]; + if (epsilon_init_count) return ++epsilon_init_count; home = getenv("HOME"); base_len = snprintf(buf, sizeof(buf), "%s/.thumbnails", home); @@ -180,8 +182,10 @@ } } + closedir(dir); } - closedir(dir); + + return ++epsilon_init_count; } EAPI void =================================================================== RCS file: /cvs/e/e17/libs/epsilon/src/lib/Epsilon.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- Epsilon.h 6 Sep 2006 07:14:46 -0000 1.12 +++ Epsilon.h 30 Oct 2007 23:59:31 -0000 1.13 @@ -59,7 +59,7 @@ typedef enum _Epsilon_Thumb_Size Epsilon_Thumb_Size; -EAPI void epsilon_init (void); +EAPI int epsilon_init (void); /* construct destruct */ EAPI void epsilon_free (Epsilon * e); =================================================================== RCS file: /cvs/e/e17/libs/epsilon/src/lib/epsilon_thumb.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- epsilon_thumb.c 23 Oct 2007 22:04:53 -0000 1.15 +++ epsilon_thumb.c 30 Oct 2007 23:59:31 -0000 1.16 @@ -41,6 +41,7 @@ */ if (!ecore_init()) goto init_error; if (!ecore_ipc_init()) goto con_init_error; + if (!epsilon_init()) goto init_error; /* * Allocate a list for queueing requests. @@ -73,12 +74,6 @@ memset(&buffer, 0, sizeof(Epsilon_Ipc_End)); } - /* - * FIXME: This function should not be void, so we can detect failure - * and cleanup. - */ - epsilon_init(); - return ++epsilon_init_count; /* @@ -211,6 +206,7 @@ * path, don't actually generate the thumbnail here. */ tb = epsilon_new(thumb->path); + epsilon_thumb_size(tb, thumb->size); epsilon_exists(tb); thumb->dest = (char *)epsilon_thumb_file_get(tb); if (thumb->dest) ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs