efreet: make efreet optional

Summary:
Not everyone has a system or libraries that need to conform with
Freedesktop standards, making efreet not necessary on them.

This patch solves this by making efreet an optional library.

Test Plan:
`meson test -C build` + run edje, evas and elementary examples to
see if nothing got weird.

Ref T8814

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8814

Differential Revision: https://phab.enlightenment.org/D12151
This commit is contained in:
João Paulo Taylor Ienczak Zanette 2020-09-16 12:44:34 -03:00 committed by Felipe Magno de Almeida
parent f7c9d19d34
commit dd7fd87acc
30 changed files with 186 additions and 31 deletions

View File

@ -334,20 +334,20 @@ subprojects = [
['ecore_drm2' ,['drm'] , false, true, false, false, false, false, true, ['ecore'], ['libdrm']], ['ecore_drm2' ,['drm'] , false, true, false, false, false, false, true, ['ecore'], ['libdrm']],
['ecore_cocoa' ,['cocoa'] , false, true, false, false, false, false, true, ['eina'], []], ['ecore_cocoa' ,['cocoa'] , false, true, false, false, false, false, true, ['eina'], []],
['evas' ,[] , true, true, false, false, true, true, true, ['eina', 'efl', 'eo'], ['vg_common', 'libunibreak']], ['evas' ,[] , true, true, false, false, true, true, true, ['eina', 'efl', 'eo'], ['vg_common', 'libunibreak']],
['efreet' ,[] , false, true, false, false, true, false, true, ['eina', 'efl', 'eo'], []], ['efreet' ,['efreet'] , false, true, false, false, true, false, true, ['eina', 'efl', 'eo'], []],
['ecore_input_evas' ,[] , false, true, false, false, false, false, true, ['eina', 'evas'], []], ['ecore_input_evas' ,[] , false, true, false, false, false, false, true, ['eina', 'evas'], []],
['ecore_evas' ,[] , true, true, true, false, false, false, true, ['evas', 'ector'], []], ['ecore_evas' ,[] , true, true, true, false, false, false, true, ['evas', 'ector'], []],
['ecore_imf' ,[] , true, true, false, false, false, false, true, ['eina'], []], ['ecore_imf' ,[] , true, true, false, false, false, false, true, ['eina'], []],
['embryo' ,[] , false, true, true, false, false, false, true, ['eina', 'efl', 'eo'], []], ['embryo' ,[] , false, true, true, false, false, false, true, ['eina', 'efl', 'eo'], []],
['eio' ,[] , false, true, false, false, true, true, true, ['eina', 'eet'], []], ['eio' ,[] , false, true, false, false, true, true, true, ['eina', 'eet'], []],
['efreet' ,[] , false, false, true, false, false, false, true, ['eina', 'efl', 'eo'], []], ['efreet' ,['efreet'] , false, false, true, false, false, false, true, ['eina', 'efl', 'eo'], []],
['ecore_imf_evas' ,[] , false, true, false, false, false, false, true, ['eina', 'efl', 'eo'], []], ['ecore_imf_evas' ,[] , false, true, false, false, false, false, true, ['eina', 'efl', 'eo'], []],
['ephysics' ,['physics'] , false, true, false, false, false, false, true, ['eina', 'efl', 'eo'], []], ['ephysics' ,['physics'] , false, true, false, false, false, false, true, ['eina', 'efl', 'eo'], []],
['edje' ,[] , false, true, true, false, true, true, true, ['evas', 'eo', 'efl', lua_pc_name], []], ['edje' ,[] , false, true, true, false, true, true, true, ['evas', 'eo', 'efl', lua_pc_name], []],
['emotion' ,[] , true, true, false, false, true, true, true, ['eina', 'efl', 'eo'], []], ['emotion' ,[] , true, true, false, false, true, true, true, ['eina', 'efl', 'eo'], []],
['ethumb' ,['ethumb'] , true, true, true, false, false, false, true, ['eina', 'efl', 'eo'], []], ['ethumb' ,['ethumb'] , true, true, true, false, false, false, true, ['eina', 'efl', 'eo'], []],
['ethumb_client' ,['ethumb'] , false, true, true, false, false, true, true, ['eina', 'efl', 'eo', 'ethumb'], []], ['ethumb_client' ,['ethumb'] , false, true, true, false, false, true, true, ['eina', 'efl', 'eo', 'ethumb'], []],
['elementary' ,[] , true, true, true, true, true, true, true, ['eina', 'efl', 'eo', 'eet', 'evas', 'ecore', 'ecore-evas', 'ecore-file', 'ecore-input', 'edje', 'emotion', 'ecore-imf', 'ecore-con', 'eldbus', 'efreet', 'efreet-mime', 'efreet-trash', 'eio'], ['atspi']], ['elementary' ,[] , true, true, true, true, true, true, true, ['eina', 'efl', 'eo', 'eet', 'evas', 'ecore', 'ecore-evas', 'ecore-file', 'ecore-input', 'edje', 'emotion', 'ecore-imf', 'ecore-con', 'eldbus', 'eio'], ['atspi']],
['efl_canvas_wl' ,['wl'] , false, true, true, false, false, false, true, ['eina', 'efl', 'eo', 'evas', 'ecore'], []], ['efl_canvas_wl' ,['wl'] , false, true, true, false, false, false, true, ['eina', 'efl', 'eo', 'evas', 'ecore'], []],
['elua' ,['elua'] , false, true, true, false, true, false, false, ['eina', lua_pc_name], []], ['elua' ,['elua'] , false, true, true, false, true, false, false, ['eina', lua_pc_name], []],
['ecore_wayland' ,['wl-deprecated'] , false, true, false, false, false, false, false, ['eina'], []], ['ecore_wayland' ,['wl-deprecated'] , false, true, false, false, false, false, false, ['eina'], []],

View File

@ -106,6 +106,12 @@ option('build-tests',
description : 'Compile tests' description : 'Compile tests'
) )
option('efreet',
type : 'boolean',
value : true,
description : 'Enable efreet library',
)
option('crypto', option('crypto',
type : 'combo', type : 'combo',
choices : ['gnutls', 'openssl'], choices : ['gnutls', 'openssl'],

View File

@ -151,7 +151,9 @@ main(int argc, char **argv)
setlocale(LC_NUMERIC, "C"); setlocale(LC_NUMERIC, "C");
ecore_app_no_system_modules(); ecore_app_no_system_modules();
#ifdef HAVE_EFREET
efreet_cache_disable(); efreet_cache_disable();
#endif
if (!eina_init()) if (!eina_init())
return -1; return -1;

View File

@ -5,11 +5,15 @@ edje_bin_deps = [
lua, eet, evas, lua, eet, evas,
ecore_file, ecore_input, ecore_file, ecore_input,
ecore_imf, ecore_imf_evas, ecore_imf, ecore_imf_evas,
embryo, efreet, eio, embryo, eio,
edje, ecore_evas, edje, ecore_evas,
intl, intl,
] ]
if get_option('efreet')
edje_bin_deps += efreet
endif
edje_cc_src = [ edje_cc_src = [
'edje_multisense_convert.h', 'edje_multisense_convert.h',
'edje_cc.h', 'edje_cc.h',

View File

@ -1577,6 +1577,7 @@ _theme_sel(void *data EINA_UNUSED,
printf("not implemented\n"); printf("not implemented\n");
}*/ }*/
#ifdef ELM_EFREET
static void static void
_icon_preview_icon_add(const char *icon, const char *theme) _icon_preview_icon_add(const char *icon, const char *theme)
{ {
@ -1594,6 +1595,7 @@ _icon_preview_icon_add(const char *icon, const char *theme)
if (strcmp(theme, ELM_CONFIG_ICON_THEME_ELEMENTARY)) if (strcmp(theme, ELM_CONFIG_ICON_THEME_ELEMENTARY))
elm_image_file_set(ic, efreet_icon_path_find(theme, icon, 48), NULL); elm_image_file_set(ic, efreet_icon_path_find(theme, icon, 48), NULL);
} }
#endif
static void static void
@ -1611,8 +1613,10 @@ _icon_preview_update(Evas_Object *win)
const char *theme = evas_object_data_get(win, "icon_theme"); const char *theme = evas_object_data_get(win, "icon_theme");
elm_box_clear(icon_preview_frame); elm_box_clear(icon_preview_frame);
#ifdef ELM_EFREET
for (example_icon = example_icons; !!*example_icon; example_icon++) for (example_icon = example_icons; !!*example_icon; example_icon++)
_icon_preview_icon_add(*example_icon, theme); _icon_preview_icon_add(*example_icon, theme);
#endif
} }
static void static void
@ -1672,15 +1676,18 @@ _icon_theme_sel(void *data, Evas_Object *obj,
static Eina_Bool static Eina_Bool
_icon_theme_valid(const char *theme) _icon_theme_valid(const char *theme)
{ {
const char *icon_path; const char *icon_path = NULL;
#ifdef ELM_EFREET
icon_path = efreet_icon_path_find(theme, "folder", 48); icon_path = efreet_icon_path_find(theme, "folder", 48);
#endif
return !!icon_path; return !!icon_path;
} }
static int static int
_icon_theme_list_sort(const void *data1, const void *data2) _icon_theme_list_sort(const void *data1, const void *data2)
{ {
#ifdef ELM_EFREET
const Efreet_Icon_Theme *t1, *t2; const Efreet_Icon_Theme *t1, *t2;
t1 = data1; t1 = data1;
@ -1690,6 +1697,9 @@ _icon_theme_list_sort(const void *data1, const void *data2)
if (!t2->name.name) return -1; if (!t2->name.name) return -1;
return strcmp(t1->name.name, t2->name.name); return strcmp(t1->name.name, t2->name.name);
#else
return 0;
#endif
} }
static void static void
@ -2391,7 +2401,9 @@ _status_config_icons(Evas_Object *win,
{ {
Evas_Object *tb, *rc, *sp, *ck, *li, *bx, *ic, *pd, *fr, *bt; Evas_Object *tb, *rc, *sp, *ck, *li, *bx, *ic, *pd, *fr, *bt;
Eina_List *list, *l; Eina_List *list, *l;
#ifdef ELM_EFREET
const Efreet_Icon_Theme *th; const Efreet_Icon_Theme *th;
#endif
Elm_Object_Item *list_it, *def_it = NULL; Elm_Object_Item *list_it, *def_it = NULL;
tb = elm_table_add(win); tb = elm_table_add(win);
@ -2435,6 +2447,7 @@ _status_config_icons(Evas_Object *win,
evas_object_data_set(win, "icon_theme", elm_config_icon_theme_get()); evas_object_data_set(win, "icon_theme", elm_config_icon_theme_get());
#ifdef ELM_EFREET
list = efreet_icon_theme_list_get(); list = efreet_icon_theme_list_get();
list = eina_list_sort(list, eina_list_count(list), _icon_theme_list_sort); list = eina_list_sort(list, eina_list_count(list), _icon_theme_list_sort);
EINA_LIST_FOREACH(list, l, th) EINA_LIST_FOREACH(list, l, th)
@ -2452,6 +2465,8 @@ _status_config_icons(Evas_Object *win,
if (!strcmp(elm_config_icon_theme_get(), th->name.internal)) if (!strcmp(elm_config_icon_theme_get(), th->name.internal))
elm_list_item_selected_set(list_it, EINA_TRUE); elm_list_item_selected_set(list_it, EINA_TRUE);
} }
#endif
if (!elm_list_selected_items_get(li)) if (!elm_list_selected_items_get(li))
elm_list_item_selected_set(def_it, EINA_TRUE); elm_list_item_selected_set(def_it, EINA_TRUE);

View File

@ -410,7 +410,14 @@ _edje_extract_mo_files(Edje_File *edf)
unsigned int i; unsigned int i;
int len; int len;
cache_path = efreet_cache_home_get(); char cache_dir[30];
#ifdef HAVE_EFREET
snprintf(cache_dir, 30, "%s", efreet_cache_home_get());
#else
snprintf(cache_dir, 30, "%s/.cache", eina_environment_home_get());
#endif
cache_path = cache_dir;
t = eina_file_mtime_get(edf->f); t = eina_file_mtime_get(edf->f);
sz = eina_file_size_get(edf->f); sz = eina_file_size_get(edf->f);

View File

@ -75,11 +75,13 @@ edje_init(void)
goto shutdown_eet; goto shutdown_eet;
} }
#ifdef HAVE_EFREET
if (!efreet_init()) if (!efreet_init())
{ {
ERR("Efreet init failed"); ERR("Efreet init failed");
goto shutdown_evas; goto shutdown_evas;
} }
#endif
_edje_scale = FROM_DOUBLE(1.0); _edje_scale = FROM_DOUBLE(1.0);
_edje_global_obj = efl_add(EDJE_GLOBAL_CLASS, efl_main_loop_get()); _edje_global_obj = efl_add(EDJE_GLOBAL_CLASS, efl_main_loop_get());
@ -123,8 +125,15 @@ edje_init(void)
_edje_language = eina_stringshare_add(getenv("LANGUAGE")); _edje_language = eina_stringshare_add(getenv("LANGUAGE"));
char cache_dir[PATH_MAX];
#ifdef HAVE_EFREET
snprintf(cache_dir, PATH_MAX, "%s", efreet_cache_home_get());
#else
snprintf(cache_dir, PATH_MAX, "%s/.cache", eina_environment_home_get());
#endif
str = eina_strbuf_new(); str = eina_strbuf_new();
eina_strbuf_append_printf(str, "%s/edje", efreet_cache_home_get()); eina_strbuf_append_printf(str, "%s/edje", cache_dir);
_edje_cache_path = eina_stringshare_add(eina_strbuf_string_get(str)); _edje_cache_path = eina_stringshare_add(eina_strbuf_string_get(str));
eina_strbuf_free(str); eina_strbuf_free(str);
@ -161,8 +170,10 @@ shutdown_all:
_edje_global_obj = NULL; _edje_global_obj = NULL;
} }
shutdown_efreet: shutdown_efreet:
#ifdef HAVE_EFREET
efreet_shutdown(); efreet_shutdown();
shutdown_evas: shutdown_evas:
#endif
evas_shutdown(); evas_shutdown();
shutdown_eet: shutdown_eet:
eet_shutdown(); eet_shutdown();
@ -236,7 +247,9 @@ _edje_shutdown_core(void)
_edje_ephysics_clear(); _edje_ephysics_clear();
#endif #endif
#ifdef HAVE_EFREET
efreet_shutdown(); efreet_shutdown();
#endif
ecore_shutdown(); ecore_shutdown();
evas_shutdown(); evas_shutdown();
eet_shutdown(); eet_shutdown();

View File

@ -53,7 +53,9 @@
# include <Ecore_IMF_Evas.h> # include <Ecore_IMF_Evas.h>
#endif #endif
#include <Embryo.h> #include <Embryo.h>
#include <Efreet.h> #ifdef HAVE_EFREET
# include <Efreet.h>
#endif
#ifdef HAVE_EIO #ifdef HAVE_EIO
# include <Eio.h> # include <Eio.h>

View File

@ -3,10 +3,14 @@ edje_deps = [
eet, evas, ecore_evas, eet, evas, ecore_evas,
ecore_file, ecore_input, ecore_file, ecore_input,
ecore_imf, ecore_imf_evas, ecore_imf, ecore_imf_evas,
embryo, efreet, eio, intl, embryo, eio, intl,
buildsystem buildsystem
] ]
if get_option('efreet')
edje_deps += efreet
endif
edje_pub_deps = [evas, eo, efl] edje_pub_deps = [evas, eo, efl]
edje_ext_deps = [m, lua, buildsystem_simple] edje_ext_deps = [m, lua, buildsystem_simple]

View File

@ -15,5 +15,6 @@
#define EFL_BUILD_ID "@EFL_BUILD_ID@" #define EFL_BUILD_ID "@EFL_BUILD_ID@"
#mesondefine HAVE_ETHUMB #mesondefine HAVE_ETHUMB
#mesondefine HAVE_EFREET
#endif #endif

View File

@ -10,7 +10,9 @@
#include <Ecore.h> #include <Ecore.h>
#include <Ecore_File.h> #include <Ecore_File.h>
#include <Eo.h> #include <Eo.h>
#include <Efreet_Mime.h> #ifdef HAVE_EFREET
# include <Efreet_Mime.h>
#endif
#include "Eio.h" #include "Eio.h"
@ -478,7 +480,9 @@ _eio_build_mime_now(Eo *model, void *data, const Eina_Value v)
return eina_future_as_value(efl_future_then(model, f)); return eina_future_as_value(efl_future_then(model, f));
} }
#ifdef HAVE_EFREET
pd->mime_type = efreet_mime_type_get(pd->path); pd->mime_type = efreet_mime_type_get(pd->path);
#endif
efl_model_properties_changed(model, "mime_type"); efl_model_properties_changed(model, "mime_type");
delayed_one = EINA_TRUE; delayed_one = EINA_TRUE;

View File

@ -16,7 +16,9 @@
* License along with this library; * License along with this library;
* if not, see <http://www.gnu.org/licenses/>. * if not, see <http://www.gnu.org/licenses/>.
*/ */
#include <Efreet_Mime.h> #ifdef HAVE_EFREET
# include <Efreet_Mime.h>
#endif
#include "eio_private.h" #include "eio_private.h"
/*============================================================================* /*============================================================================*
@ -317,7 +319,9 @@ eio_init(void)
eio_monitor_init(); eio_monitor_init();
#ifdef HAVE_EFREET
efreet_mime_init(); efreet_mime_init();
#endif
io_manager = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get()); io_manager = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get());
efl_provider_register(efl_main_loop_get(), EFL_IO_MANAGER_CLASS, io_manager); efl_provider_register(efl_main_loop_get(), EFL_IO_MANAGER_CLASS, io_manager);
@ -371,7 +375,9 @@ eio_shutdown(void)
CRI("We couldn't terminate in less than 30s some pending IO. This can led to some crash."); CRI("We couldn't terminate in less than 30s some pending IO. This can led to some crash.");
} }
#ifdef HAVE_EFREET
efreet_mime_shutdown(); efreet_mime_shutdown();
#endif
eio_monitor_shutdown(); eio_monitor_shutdown();

View File

@ -64,7 +64,10 @@ elif sys_bsd == true
eio_src += files(['eio_monitor_kevent.c']) eio_src += files(['eio_monitor_kevent.c'])
endif endif
eio_deps = [ecore, ecore_file, eet, eo, eina, efl, emile, efreet] eio_deps = [ecore, ecore_file, eet, eo, eina, efl, emile]
if get_option('efreet')
eio_deps += efreet
endif
eio_pub_deps = [eina, eet] eio_pub_deps = [eina, eet]
eio_ext_deps = [m] eio_ext_deps = [m]

View File

@ -69,9 +69,11 @@
#include <Ecore_Con.h> #include <Ecore_Con.h>
#include <Edje.h> #include <Edje.h>
#include <Eldbus.h> #include <Eldbus.h>
#include <Efreet.h> #ifdef HAVE_EFREET
#include <Efreet_Mime.h> # include <Efreet.h>
#include <Efreet_Trash.h> # include <Efreet_Mime.h>
# include <Efreet_Trash.h>
#endif
#ifdef HAVE_ETHUMB #ifdef HAVE_ETHUMB
#include <Ethumb_Client.h> #include <Ethumb_Client.h>
#endif #endif

View File

@ -2111,6 +2111,7 @@ _icon_standard_set(Evas_Object *obj, const char *name)
return EINA_FALSE; return EINA_FALSE;
} }
#ifdef HAVE_EFREET
static Eina_Bool static Eina_Bool
_icon_freedesktop_set(Evas_Object *obj, const char *name, int size) _icon_freedesktop_set(Evas_Object *obj, const char *name, int size)
{ {
@ -2158,6 +2159,7 @@ _icon_freedesktop_set(Evas_Object *obj, const char *name, int size)
} }
return EINA_FALSE; return EINA_FALSE;
} }
#endif
static inline int static inline int
_icon_size_min_get(Evas_Object *image) _icon_size_min_get(Evas_Object *image)
@ -2200,6 +2202,7 @@ _internal_efl_ui_image_icon_set(Evas_Object *obj, const char *name, Eina_Bool *f
if (!strcmp(ELM_CONFIG_ICON_THEME_ELEMENTARY, elm_config_icon_theme_get())) if (!strcmp(ELM_CONFIG_ICON_THEME_ELEMENTARY, elm_config_icon_theme_get()))
{ {
ret = _icon_standard_set(obj, name); ret = _icon_standard_set(obj, name);
#ifdef HAVE_EFREET
if (ret && fdo) *fdo = EINA_FALSE; if (ret && fdo) *fdo = EINA_FALSE;
if (!ret) if (!ret)
{ {
@ -2211,6 +2214,7 @@ _internal_efl_ui_image_icon_set(Evas_Object *obj, const char *name, Eina_Bool *f
{ {
ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj)); ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj));
if (ret && fdo) *fdo = EINA_TRUE; if (ret && fdo) *fdo = EINA_TRUE;
#endif
} }
if (ret) if (ret)

View File

@ -2815,6 +2815,7 @@ _icon_standard_set(Evas_Object *obj, const char *name, Eina_Bool resize)
return EINA_FALSE; return EINA_FALSE;
} }
#ifdef HAVE_EFREET
static Eina_Bool static Eina_Bool
_icon_freedesktop_set(Evas_Object *obj, const char *name, int size) _icon_freedesktop_set(Evas_Object *obj, const char *name, int size)
{ {
@ -2862,6 +2863,7 @@ _icon_freedesktop_set(Evas_Object *obj, const char *name, int size)
} }
return EINA_FALSE; return EINA_FALSE;
} }
#endif
static inline int static inline int
_icon_size_min_get(Evas_Object *image) _icon_size_min_get(Evas_Object *image)
@ -2905,6 +2907,7 @@ _internal_efl_ui_image_zoomable_icon_set(Evas_Object *obj, const char *name, Ein
{ {
ret = _icon_standard_set(obj, name, resize); ret = _icon_standard_set(obj, name, resize);
if (ret && fdo) *fdo = EINA_FALSE; if (ret && fdo) *fdo = EINA_FALSE;
#ifdef HAVE_EFREET
if (!ret) if (!ret)
{ {
ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj)); ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj));
@ -2915,6 +2918,7 @@ _internal_efl_ui_image_zoomable_icon_set(Evas_Object *obj, const char *name, Ein
{ {
ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj)); ret = _icon_freedesktop_set(obj, name, _icon_size_min_get(obj));
if (ret && fdo) *fdo = EINA_TRUE; if (ret && fdo) *fdo = EINA_TRUE;
#endif
} }
if (ret) if (ret)

View File

@ -4676,6 +4676,7 @@ _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *element, const char *style)
} }
if (((!sd->icon_name) || (!set)) && _elm_appname) if (((!sd->icon_name) || (!set)) && _elm_appname)
{ {
#ifdef HAVE_EFREET
Efreet_Desktop *d; Efreet_Desktop *d;
d = efreet_util_desktop_exec_find(_elm_appname); d = efreet_util_desktop_exec_find(_elm_appname);
if (d) if (d)
@ -4686,6 +4687,7 @@ _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *element, const char *style)
efl_ui_image_icon_set(sd->icon, d->icon); efl_ui_image_icon_set(sd->icon, d->icon);
efreet_desktop_free(d); efreet_desktop_free(d);
} }
#endif
} }
efl_access_object_access_type_set(sd->icon, EFL_ACCESS_TYPE_DISABLED); efl_access_object_access_type_set(sd->icon, EFL_ACCESS_TYPE_DISABLED);
} }

View File

@ -132,7 +132,9 @@ ELM_API Elm_Code_File *elm_code_file_open(Elm_Code *code, const char *path)
ret = elm_code_file_new(code); ret = elm_code_file_new(code);
file = eina_file_open(path, EINA_FALSE); file = eina_file_open(path, EINA_FALSE);
ret->file = file; ret->file = file;
#ifdef HAVE_EFREET
ret->mime = efreet_mime_type_get(path); ret->mime = efreet_mime_type_get(path);
#endif
lastindex = 1; lastindex = 1;
ret->map = eina_file_map_all(file, EINA_FILE_POPULATE); ret->map = eina_file_map_all(file, EINA_FILE_POPULATE);

View File

@ -271,9 +271,9 @@ _icon_thumb_apply_cb(void *data,
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }
#endif #endif
#ifdef HAVE_EFREET
static Eina_Bool static Eina_Bool
_icon_freedesktop_set(Evas_Object *obj, _icon_freedesktop_set(Evas_Object *obj,
const char *theme, const char *theme,
@ -298,6 +298,7 @@ _icon_freedesktop_set(Evas_Object *obj,
} }
return EINA_FALSE; return EINA_FALSE;
} }
#endif
static void static void
_edje_signal_callback(void *data, _edje_signal_callback(void *data,
@ -439,6 +440,7 @@ _internal_elm_icon_standard_set(Evas_Object *obj,
if (!strcmp(ELM_CONFIG_ICON_THEME_ELEMENTARY, elm_config_icon_theme_get())) if (!strcmp(ELM_CONFIG_ICON_THEME_ELEMENTARY, elm_config_icon_theme_get()))
{ {
ret = _icon_standard_set(obj, name); ret = _icon_standard_set(obj, name);
#ifdef HAVE_EFREET
if (ret && fdo) *fdo = EINA_FALSE; if (ret && fdo) *fdo = EINA_FALSE;
if (!ret) if (!ret)
@ -451,6 +453,7 @@ _internal_elm_icon_standard_set(Evas_Object *obj,
{ {
ret = _icon_freedesktop_set(obj, NULL, name, _icon_size_min_get(obj)); ret = _icon_freedesktop_set(obj, NULL, name, _icon_size_min_get(obj));
if (ret && fdo) *fdo = EINA_TRUE; if (ret && fdo) *fdo = EINA_TRUE;
#endif
} }
if (ret) if (ret)

View File

@ -702,6 +702,7 @@ ELM_API Eina_Bool
elm_need_efreet(void) elm_need_efreet(void)
{ {
if (_elm_need_efreet) return EINA_TRUE; if (_elm_need_efreet) return EINA_TRUE;
#ifdef HAVE_EFREET
if (!efreet_init()) return EINA_FALSE; if (!efreet_init()) return EINA_FALSE;
if (!efreet_mime_init()) if (!efreet_mime_init())
{ {
@ -729,6 +730,7 @@ elm_need_efreet(void)
} }
} }
*/ */
#endif
return EINA_TRUE; return EINA_TRUE;
} }
@ -737,9 +739,11 @@ _elm_unneed_efreet(void)
{ {
if (!_elm_need_efreet) return; if (!_elm_need_efreet) return;
_elm_need_efreet = EINA_FALSE; _elm_need_efreet = EINA_FALSE;
#ifdef HAVE_EFREET
efreet_trash_shutdown(); efreet_trash_shutdown();
efreet_mime_shutdown(); efreet_mime_shutdown();
efreet_shutdown(); efreet_shutdown();
#endif
} }
ELM_API void ELM_API void

View File

@ -710,7 +710,14 @@ _grid_item_create(Grid *g,
evas_object_pass_events_set(gi->img, EINA_TRUE); evas_object_pass_events_set(gi->img, EINA_TRUE);
evas_object_stack_below(gi->img, g->wsd->sep_maps_overlays); evas_object_stack_below(gi->img, g->wsd->sep_maps_overlays);
snprintf(buf, sizeof(buf), "%s" CACHE_TILE_ROOT, efreet_cache_home_get(), char cache_dir[30];
#ifdef HAVE_EFREET
snprintf(cache_dir, 30, "%s", efreet_cache_home_get());
#else
snprintf(cache_dir, 30, "%s/.cache", eina_environment_home_get());
#endif
snprintf(buf, sizeof(buf), "%s" CACHE_TILE_ROOT, cache_dir,
g->wsd->id, g->zoom, x); g->wsd->id, g->zoom, x);
snprintf(buf2, sizeof(buf2), CACHE_TILE_PATH, buf, y); snprintf(buf2, sizeof(buf2), CACHE_TILE_PATH, buf, y);
@ -3212,8 +3219,14 @@ _prepare_download()
{ {
char fname[PATH_MAX]; char fname[PATH_MAX];
snprintf(fname, sizeof(fname), "%s" CACHE_NAME_ROOT, char cache_dir[30];
efreet_cache_home_get()); #ifdef HAVE_EFREET
snprintf(cache_dir, 30, "%s", efreet_cache_home_get());
#else
snprintf(cache_dir, 30, "%s/.cache", eina_environment_home_get());
#endif
snprintf(fname, sizeof(fname), "%s" CACHE_NAME_ROOT, cache_dir);
if (!ecore_file_exists(fname)) ecore_file_mkpath(fname); if (!ecore_file_exists(fname)) ecore_file_mkpath(fname);
return strdup(fname); return strdup(fname);
} }
@ -4256,7 +4269,14 @@ _elm_map_efl_canvas_group_group_del(Eo *obj, Elm_Map_Data *sd)
{ {
char buf[4096]; char buf[4096];
snprintf(buf, sizeof(buf), "%s" CACHE_ROOT, efreet_cache_home_get());
char cache_dir[30];
#ifdef HAVE_EFREET
snprintf(cache_dir, 30, "%s", efreet_cache_home_get());
#else
snprintf(cache_dir, 30, "%s/.cache", eina_environment_home_get());
#endif
snprintf(buf, sizeof(buf), "%s" CACHE_ROOT, cache_dir);
ecore_file_recursive_rm(buf); ecore_file_recursive_rm(buf);
} }
@ -4651,8 +4671,14 @@ _elm_map_route_add(Eo *obj, Elm_Map_Data *sd, Elm_Map_Route_Type type, Elm_Map_R
EINA_SAFETY_ON_NULL_RETURN_VAL(sd->src_route, NULL); EINA_SAFETY_ON_NULL_RETURN_VAL(sd->src_route, NULL);
{ {
char cache_dir[30];
#ifdef HAVE_EFREET
snprintf(cache_dir, 30, "%s", efreet_cache_home_get());
#else
snprintf(cache_dir, 30, "%s/.cache", eina_environment_home_get());
#endif
snprintf(fname, sizeof(fname), "%s" CACHE_ROUTE_ROOT, snprintf(fname, sizeof(fname), "%s" CACHE_ROUTE_ROOT,
efreet_cache_home_get()); cache_dir);
if (!ecore_file_exists(fname)) ecore_file_mkpath(fname); if (!ecore_file_exists(fname)) ecore_file_mkpath(fname);
} }

View File

@ -347,10 +347,17 @@ elm_prefs_data_new(const char *data_file,
if (mode == EET_FILE_MODE_READ) if (mode == EET_FILE_MODE_READ)
prefs_data->autosave = EINA_FALSE; prefs_data->autosave = EINA_FALSE;
char config_dir[30];
#ifdef HAVE_EFREET
snprintf(config_dir, 30, "%s", efreet_config_home_get());
#else
snprintf(config_dir, 30, "%s/.config", eina_environment_home_get());
#endif
if (data_file) prefs_data->data_file = eina_stringshare_add(data_file); if (data_file) prefs_data->data_file = eina_stringshare_add(data_file);
else else
prefs_data->data_file = eina_stringshare_printf prefs_data->data_file = eina_stringshare_printf
("%s/%s", efreet_config_home_get(), _elm_appname); ("%s/%s", config_dir, _elm_appname);
prefs_data->key = eina_stringshare_add(key ? key : "main"); prefs_data->key = eina_stringshare_add(key ? key : "main");

View File

@ -952,9 +952,13 @@ elementary_src = files([
'efl_ui_spotlight_animation_manager.c', 'efl_ui_spotlight_animation_manager.c',
]) ])
elementary_deps = [emile, eo, efl, edje, emotion, ecore_imf, ecore_con, eldbus, efreet, eio, buildsystem] elementary_deps = [emile, eo, efl, edje, emotion, ecore_imf, ecore_con, eldbus, eio, buildsystem]
elementary_pub_deps = [eina, eet, evas, ecore, ecore_evas, ecore_file, ecore_input, ecore_imf, ecore_con, elementary_pub_deps = [eina, eet, evas, ecore, ecore_evas, ecore_file, ecore_input, ecore_imf, ecore_con,
edje, eldbus, efreet, efl] edje, eldbus, efl]
if get_option('efreet')
elementary_deps += efreet
elementary_pub_deps += efreet
endif
elementary_ext_deps = [atspi, dl, intl, buildsystem_simple] elementary_ext_deps = [atspi, dl, intl, buildsystem_simple]
if get_option('ethumb') if get_option('ethumb')
@ -973,7 +977,9 @@ if sys_windows == false
elm_options.set('ELM_UNIX', '1') elm_options.set('ELM_UNIX', '1')
endif endif
elm_options.set('ELM_EFREET', '1') if get_option('efreet')
elm_options.set('ELM_EFREET', '1')
endif
if config_h.has('HAVE_ALLOCA_H') if config_h.has('HAVE_ALLOCA_H')
elm_options.set('ELM_ALLOCA_H', '1') elm_options.set('ELM_ALLOCA_H', '1')

View File

@ -13,7 +13,9 @@
#include <Ecore_X.h> #include <Ecore_X.h>
#include <Ecore_X_Atoms.h> #include <Ecore_X_Atoms.h>
#include <Efreet.h> #ifdef HAVE_EFREET
# include <Efreet.h>
#endif
#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11 #ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
# include <Evas_Engine_Software_X11.h> # include <Evas_Engine_Software_X11.h>
@ -3865,6 +3867,7 @@ _deliver_content(Ecore_Evas *ee, Ecore_Evas_Engine_Data_X11 *edata, Ecore_Evas_S
EINA_SAFETY_ON_NULL_GOTO(ev->data, err); EINA_SAFETY_ON_NULL_GOTO(ev->data, err);
if (eina_streq(mime_type, "text/uri-list")) if (eina_streq(mime_type, "text/uri-list"))
{ {
#ifdef HAVE_EFREET
Ecore_X_Selection_Data_Files *files = ev->data; Ecore_X_Selection_Data_Files *files = ev->data;
Efreet_Uri *uri; Efreet_Uri *uri;
Eina_Strbuf *strbuf; Eina_Strbuf *strbuf;
@ -3889,6 +3892,7 @@ _deliver_content(Ecore_Evas *ee, Ecore_Evas_Engine_Data_X11 *edata, Ecore_Evas_S
} }
result = _create_delivery_content(eina_strbuf_length_get(strbuf) + 1, eina_strbuf_string_get(strbuf), mime_type); result = _create_delivery_content(eina_strbuf_length_get(strbuf) + 1, eina_strbuf_string_get(strbuf), mime_type);
eina_strbuf_free(strbuf); eina_strbuf_free(strbuf);
#endif
} }
else if (eina_str_has_prefix(mime_type,"text")) else if (eina_str_has_prefix(mime_type,"text"))
{ {

View File

@ -12,9 +12,13 @@ if get_option('opengl') != 'none'
engine_deps += [engine_gl_x11] engine_deps += [engine_gl_x11]
endif endif
if get_option('efreet')
engine_deps += [efreet]
endif
shared_module(mod_full_name, engine_src, shared_module(mod_full_name, engine_src,
include_directories : config_dir + [engine_include_dir], include_directories : config_dir + [engine_include_dir],
dependencies : [eina, ecore_evas, ecore_input_evas, efreet] + engine_deps, dependencies : [eina, ecore_evas, ecore_input_evas] + engine_deps,
install : true, install : true,
install_dir : mod_install_dir, install_dir : mod_install_dir,
name_suffix : sys_mod_extension name_suffix : sys_mod_extension

View File

@ -5,7 +5,9 @@
#include "edje_suite.h" #include "edje_suite.h"
#include "../efl_check.h" #include "../efl_check.h"
#include <Ecore_Evas.h> #include <Ecore_Evas.h>
#include <Efreet.h> #ifdef HAVE_EFREET
# include <Efreet.h>
#endif
#include <Ecore.h> #include <Ecore.h>
static const Efl_Test_Case etc[] = { static const Efl_Test_Case etc[] = {
@ -74,7 +76,9 @@ main(int argc, char **argv)
putenv("EFL_RUN_IN_TREE=1"); putenv("EFL_RUN_IN_TREE=1");
#endif #endif
ecore_app_no_system_modules(); ecore_app_no_system_modules();
#ifdef HAVE_EFREET
efreet_cache_disable(); efreet_cache_disable();
#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1, failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Edje", etc, SUITE_INIT_FN(edje), SUITE_SHUTDOWN_FN(edje)); "Edje", etc, SUITE_INIT_FN(edje), SUITE_SHUTDOWN_FN(edje));

View File

@ -15,9 +15,14 @@ edje_suite_src = [
'efl_test_layout3.c', 'efl_test_layout3.c',
] ]
edje_test_deps = []
if get_option('efreet')
edje_test_deps += efreet
endif
edje_suite = executable('edje_suite', edje_suite = executable('edje_suite',
edje_suite_src, themes, edje_suite_src, themes,
dependencies: [check, eina, ecore_evas, edje, efreet], dependencies: [check, eina, ecore_evas, edje] + edje_test_deps,
include_directories : config_dir, include_directories : config_dir,
c_args : [ c_args : [
'-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',

View File

@ -7,7 +7,9 @@
#include "eio_suite.h" #include "eio_suite.h"
#include "../efl_check.h" #include "../efl_check.h"
#include <Eio.h> #include <Eio.h>
#include <Efreet.h> #ifdef HAVE_EFREET
# include <Efreet.h>
#endif
EFL_START_TEST(eio_init_test) EFL_START_TEST(eio_init_test)
{ {
@ -52,7 +54,9 @@ main(int argc, char **argv)
{ {
int failed_count; int failed_count;
#ifdef HAVE_EFREET
efreet_cache_disable(); efreet_cache_disable();
#endif
if (!_efl_test_option_disp(argc, argv, etc)) if (!_efl_test_option_disp(argc, argv, etc))
return 0; return 0;

View File

@ -15,10 +15,15 @@ eio_suite_src = [
'eio_suite.h' 'eio_suite.h'
] ]
eio_test_deps = []
if get_option('efreet')
eio_test_deps += efreet
endif
eio_suite = executable('eio_suite', eio_suite = executable('eio_suite',
eio_suite_src, eio_suite_src,
include_directories : [config_dir], include_directories : [config_dir],
dependencies: [eo, ecore, eina, ecore_file, eio, check, efreet], dependencies: [eo, ecore, eina, ecore_file, eio, check] + eio_test_deps,
c_args : [ c_args : [
'-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"', '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
'-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"'] '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']

View File

@ -327,7 +327,9 @@ suite_setup(Eina_Bool legacy)
main_pid = getpid(); main_pid = getpid();
ecore_app_no_system_modules(); ecore_app_no_system_modules();
#ifdef HAVE_EFREET
efreet_cache_disable(); efreet_cache_disable();
#endif
if (legacy) if (legacy)
failed_count = _efl_suite_build_and_run(0, NULL, failed_count = _efl_suite_build_and_run(0, NULL,