ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/tools/edi.git/commit/?id=daadcea243ef4130235f63323b2069e034c67903
commit daadcea243ef4130235f63323b2069e034c67903 Author: Andy Williams <a...@andywilliams.me> Date: Thu Jun 8 12:15:05 2017 -0700 scm: OK avatars working now :) --- src/bin/screens/edi_scm_screens.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/bin/screens/edi_scm_screens.c b/src/bin/screens/edi_scm_screens.c index f16873c..7c23ad7 100644 --- a/src/bin/screens/edi_scm_screens.c +++ b/src/bin/screens/edi_scm_screens.c @@ -186,14 +186,12 @@ void _edi_scm_screens_avatar_download_complete(void *data, const char *file, return; } - // TODO figure why this crashes - //elm_image_file_set(image, file, NULL); + elm_image_file_set(image, file, NULL); } void edi_scm_screens_avatar_load(Evas_Object *image, const char *email) { const char *tmp, *cache, *cachedir, *cacheparentdir; - Ecore_File_Download_Job *job; cache = _edi_scm_avatar_cache_path_get(email); if (ecore_file_exists(cache)) @@ -206,23 +204,16 @@ void edi_scm_screens_avatar_load(Evas_Object *image, const char *email) cachedir = strdup(tmp); cacheparentdir = dirname((char *) tmp); if (!ecore_file_exists(cacheparentdir) && !ecore_file_mkdir(cacheparentdir)) - { - free((char *)tmp); - free((char *)cachedir); - return; - } + goto clear; - free((char *)tmp); if (!ecore_file_exists(cachedir) && !ecore_file_mkdir(cachedir)) - { - free((char *)cachedir); - return; - } - - free((char *)cachedir); + goto clear; ecore_file_download(edi_scm_avatar_url_get(email), cache, _edi_scm_screens_avatar_download_complete, NULL, - image, &job); + image, NULL); + +clear: + free((char *)cachedir); } --