elm config - reload at runtime - fix env var overrides being lost

if you set config via environment variables then sa config
update/reload may end up overriding these again whenever it is updated
and thus may result in scaling or other things suddely changing

@fix
This commit is contained in:
Carsten Haitzler 2017-04-10 11:05:56 +09:00
parent 6aa72e3cf6
commit 46bfd7ffb9
1 changed files with 7 additions and 1 deletions

View File

@ -1671,6 +1671,7 @@ _config_load(void)
{ {
if (_elm_config->config_version < ELM_CONFIG_VERSION) if (_elm_config->config_version < ELM_CONFIG_VERSION)
_config_update(); _config_update();
_env_get();
return; return;
} }
} }
@ -1679,7 +1680,11 @@ _config_load(void)
* this one, if it's not the right one, someone screwed up at the time * this one, if it's not the right one, someone screwed up at the time
* of installing it */ * of installing it */
_elm_config = _config_system_load(); _elm_config = _config_system_load();
if (_elm_config) return; if (_elm_config)
{
_env_get();
return;
}
/* FIXME: config load could have failed because of a non-existent /* FIXME: config load could have failed because of a non-existent
* profile. Fallback to default before moving on */ * profile. Fallback to default before moving on */
@ -1810,6 +1815,7 @@ _config_load(void)
_elm_config->icon_theme = eina_stringshare_add(ELM_CONFIG_ICON_THEME_ELEMENTARY); _elm_config->icon_theme = eina_stringshare_add(ELM_CONFIG_ICON_THEME_ELEMENTARY);
_elm_config->popup_scrollable = EINA_FALSE; _elm_config->popup_scrollable = EINA_FALSE;
_elm_config->entry_select_allow = EINA_TRUE; _elm_config->entry_select_allow = EINA_TRUE;
_env_get();
} }
static void static void