Clouseau: use the config flag only for the old Clouseau

This commit is contained in:
Daniel Zaoui 2018-06-15 10:10:38 +03:00
parent 81519b195f
commit 1ab3094dac
3 changed files with 22 additions and 9 deletions

View File

@ -2094,7 +2094,7 @@ _config_flush_get(void)
if (pre_scale != _elm_config->scale)
_elm_rescale();
_elm_recache();
_elm_clouseau_reload();
_elm_old_clouseau_reload();
_elm_config_key_binding_hash();
_elm_win_access(_elm_config->access_mode);
ecore_event_add(ELM_EVENT_CONFIG_ALL_CHANGED, NULL, NULL, NULL);
@ -3943,7 +3943,7 @@ elm_config_clouseau_enabled_set(Eina_Bool enable)
{
_elm_config->priv.clouseau_enable = EINA_TRUE;
_elm_config->clouseau_enable = !!enable;
_elm_clouseau_reload();
_elm_old_clouseau_reload();
}
EAPI double
@ -4206,7 +4206,7 @@ _elm_config_init(void)
_elm_config_font_overlay_apply();
_elm_config_color_overlay_apply();
_elm_recache();
_elm_clouseau_reload();
_elm_old_clouseau_reload();
_elm_config_key_binding_hash();
}
@ -4398,7 +4398,7 @@ _elm_config_reload(void)
_elm_rescale();
#undef CMP
_elm_recache();
_elm_clouseau_reload();
_elm_old_clouseau_reload();
_elm_config_key_binding_hash();
ecore_event_add(ELM_EVENT_CONFIG_ALL_CHANGED, NULL, NULL, NULL);
if (ptheme) eina_stringshare_del(ptheme);
@ -4679,7 +4679,7 @@ _elm_config_profile_set(const char *profile)
_elm_config_color_overlay_apply();
_elm_rescale();
_elm_recache();
_elm_clouseau_reload();
_elm_old_clouseau_reload();
_elm_config_key_binding_hash();
}

View File

@ -251,7 +251,7 @@ static struct {
while (0)
static void
_elm_clouseau_unload()
_elm_old_clouseau_unload()
{
if (_clouseau_old_info.is_init)
{
@ -266,6 +266,11 @@ _elm_clouseau_unload()
}
_clouseau_old_info.is_init = EINA_FALSE;
}
}
static void
_elm_clouseau_unload()
{
if (_clouseau_info.is_init)
{
if (_clouseau_info.shutdown)
@ -282,11 +287,11 @@ _elm_clouseau_unload()
}
Eina_Bool
_elm_clouseau_reload()
_elm_old_clouseau_reload()
{
if (!_elm_config->clouseau_enable)
{
_elm_clouseau_unload();
_elm_old_clouseau_unload();
return EINA_TRUE;
}
@ -315,7 +320,12 @@ _elm_clouseau_reload()
_clouseau_old_info.is_init = EINA_TRUE;
}
}
return EINA_TRUE;
}
static Eina_Bool
_elm_clouseau_load()
{
if (!_clouseau_info.is_init)
{
_clouseau_info.handle = eina_module_new(
@ -385,6 +395,8 @@ elm_init(int argc, char **argv)
_prefix_shutdown();
_elm_clouseau_load();
system_handlers[0] =
ecore_event_handler_add(ECORE_EVENT_MEMORY_STATE, _sys_memory_changed, NULL);
system_handlers[1] =
@ -427,6 +439,7 @@ elm_shutdown(void)
while (_elm_win_deferred_free) ecore_main_loop_iterate();
_elm_clouseau_unload();
_elm_old_clouseau_unload();
// wrningz :(
// _prefix_shutdown();
ELM_SAFE_FREE(app_name, eina_stringshare_del);

View File

@ -597,7 +597,7 @@ void _elm_unneed_ethumb(void);
void _elm_unneed_web(void);
void _elm_rescale(void);
Eina_Bool _elm_clouseau_reload(void);
Eina_Bool _elm_old_clouseau_reload(void);
void _elm_config_init(void);
void _elm_config_sub_init(void);