bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/apps/extra.git/commit/?id=d286cde3bda9996562f863ad1acc6acaeddda143
commit d286cde3bda9996562f863ad1acc6acaeddda143 Author: Marcel Hollerbach <[email protected]> Date: Mon Jan 9 16:07:19 2017 +0100 extra: make the api pass a Extra_Theme this makes the whole thing a bit nicer to read and better to use. --- src/bin/extra_main.c | 5 +---- src/lib/extra.c | 6 +----- src/lib/extra.h | 5 +---- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/bin/extra_main.c b/src/bin/extra_main.c index 899f4ac..ea6a6cd 100644 --- a/src/bin/extra_main.c +++ b/src/bin/extra_main.c @@ -246,9 +246,6 @@ _extra_win_install_execute() { Evas_Object *progress; - _install_progress.id = _selected_theme->id; - _install_progress.is_theme = EINA_TRUE; - _install_progress.progress_cb = _extra_win_download_progress_cb; _install_progress.done_cb = _extra_win_download_done_cb; @@ -262,7 +259,7 @@ _extra_win_install_execute() elm_object_content_set(_popup, progress); evas_object_show(_popup); - extra_theme_download(&_install_progress); + extra_theme_download(&_install_progress, _selected_theme); } static void diff --git a/src/lib/extra.c b/src/lib/extra.c index 9b95a79..4c19dc8 100644 --- a/src/lib/extra.c +++ b/src/lib/extra.c @@ -341,14 +341,10 @@ _download_progress_cb(void *data EINA_UNUSED, const char *file EINA_UNUSED, } EAPI void -extra_theme_download(Extra_Progress *progress) +extra_theme_download(Extra_Progress *progress, Extra_Theme *theme) { - Extra_Theme *theme = NULL; char *path, *urlstr = NULL; - if (progress->is_theme) - theme = extra_theme_get(progress->id); - if (theme) { urlstr = extra_theme_download_url_get(theme); diff --git a/src/lib/extra.h b/src/lib/extra.h index ebaeaec..355a703 100644 --- a/src/lib/extra.h +++ b/src/lib/extra.h @@ -49,9 +49,6 @@ typedef struct _Extra_Theme typedef struct _Extra_Progress { - const char *id; - Eina_Bool is_theme; - void (*progress_cb)(double progress); void (*done_cb)(void); } Extra_Progress; @@ -150,7 +147,7 @@ EAPI char *extra_theme_download_url_get(Extra_Theme *theme); * * @ingroup Themes */ -EAPI void extra_theme_download(Extra_Progress *progress); +EAPI void extra_theme_download(Extra_Progress *progress, Extra_Theme *theme); /** * @brief Set the theme as default and restart e --
