Le 8 déc. 2015 23:22, "Carsten Haitzler" <[email protected]> a écrit :
>
> raster pushed a commit to branch master.
>
>
http://git.enlightenment.org/core/enlightenment.git/commit/?id=a885c8c0402d142efce67fac8f57b8e019e57022
>
> commit a885c8c0402d142efce67fac8f57b8e019e57022
> Author: Carsten Haitzler (Rasterman) <[email protected]>
> Date: Wed Dec 9 16:21:31 2015 +0900
>
> e - fix using an invalid icon theme - fall back to hicolor if not
exists
>
> this should fix D2036 on the e side by checking validity of an icon
> theme once efreet has finished scanning for stuff and if its invalid,
> going back to hicolor.
>
> @fix
> ---
> src/bin/e_config.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/src/bin/e_config.c b/src/bin/e_config.c
> index 00d4207..7e30bc0 100644
> --- a/src/bin/e_config.c
> +++ b/src/bin/e_config.c
> @@ -56,6 +56,7 @@ E_API int E_EVENT_CONFIG_MODE_CHANGED = 0;
> E_API int E_EVENT_CONFIG_LOADED = 0;
>
> static E_Dialog *_e_config_error_dialog = NULL;
> +static Eina_List *handlers = NULL;
>
> typedef struct _E_Color_Class
> {
> @@ -65,6 +66,24 @@ typedef struct _E_Color_Class
> int r3, g3, b3, a3;
> } E_Color_Class;
>
> +static Eina_Bool
> +_e_config_cb_efreet_cache_update(void *data EINA_UNUSED, int type
EINA_UNUSED, void *ev EINA_UNUSED)
> +{
> + if (e_config)
> + {
> + if (e_config->icon_theme)
> + {
> + if (!efreet_icon_theme_find(e_config->icon_theme))
> + {
> + e_config->icon_theme = eina_stringshare_add("hicolor");
This line looks like a memory leak to me. Shouldn't it be an
eina_stringshare_replace ?
> + e_config_save_queue();
> + }
> + }
> + }
> + return ECORE_CALLBACK_RENEW;
> +}
> +
> +
> static void
> _e_config_error_dialog_cb_delete(void *dia)
> {
> @@ -933,12 +952,21 @@ e_config_init(void)
> e_config_load();
>
> e_config_save_queue();
> +
> + E_LIST_HANDLER_APPEND(handlers, EFREET_EVENT_DESKTOP_CACHE_UPDATE,
> + _e_config_cb_efreet_cache_update, NULL);
> + E_LIST_HANDLER_APPEND(handlers, EFREET_EVENT_ICON_CACHE_UPDATE,
> + _e_config_cb_efreet_cache_update, NULL);
> + E_LIST_HANDLER_APPEND(handlers, E_EVENT_CONFIG_ICON_THEME,
> + _e_config_cb_efreet_cache_update, NULL);
> +
> return 1;
> }
>
> EINTERN int
> e_config_shutdown(void)
> {
> + E_FREE_LIST(handlers, ecore_event_handler_del);
> eina_stringshare_del(_e_config_profile);
> E_CONFIG_DD_FREE(_e_config_binding_edd);
> E_CONFIG_DD_FREE(_e_config_bindings_mouse_edd);
>
> --
>
>
>
------------------------------------------------------------------------------
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel