forked from enlightenment/efl
elm: rename _use_build_config variable -> _running_in_tree
Summary: this makes the meaning of the variable more clear no functional changes Depends on D10092 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10093
This commit is contained in:
parent
d13bd5fa8e
commit
e94686b276
|
@ -994,7 +994,7 @@ _elm_config_profile_dir_get(const char *prof,
|
||||||
if (!is_user)
|
if (!is_user)
|
||||||
goto not_user;
|
goto not_user;
|
||||||
|
|
||||||
if ((!_use_build_config) || (!bs_data_path_get(buf, sizeof(buf), "elementary/config", prof)))
|
if ((!_running_in_tree) || (!bs_data_path_get(buf, sizeof(buf), "elementary/config", prof)))
|
||||||
_elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s", prof);
|
_elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s", prof);
|
||||||
|
|
||||||
// See elm_config_profile_dir_free: always use strdup+free
|
// See elm_config_profile_dir_free: always use strdup+free
|
||||||
|
@ -1004,7 +1004,7 @@ _elm_config_profile_dir_get(const char *prof,
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
not_user:
|
not_user:
|
||||||
if ((!_use_build_config) || (!bs_data_path_get(buf, sizeof(buf), "elementary/config", prof)))
|
if ((!_running_in_tree) || (!bs_data_path_get(buf, sizeof(buf), "elementary/config", prof)))
|
||||||
snprintf(buf, sizeof(buf), "%s/config/%s", _elm_data_dir, prof);
|
snprintf(buf, sizeof(buf), "%s/config/%s", _elm_data_dir, prof);
|
||||||
|
|
||||||
// See elm_config_profile_dir_free: always use strdup+free
|
// See elm_config_profile_dir_free: always use strdup+free
|
||||||
|
@ -1389,7 +1389,7 @@ _elm_config_profiles_list(Eina_Bool hide_profiles)
|
||||||
const char *dir;
|
const char *dir;
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
|
|
||||||
if (_use_build_config)
|
if (_running_in_tree)
|
||||||
{
|
{
|
||||||
len = bs_data_path_get(buf, sizeof(buf), "elementary", "config");
|
len = bs_data_path_get(buf, sizeof(buf), "elementary", "config");
|
||||||
if (len) len = strlen(buf);
|
if (len) len = strlen(buf);
|
||||||
|
@ -1477,7 +1477,7 @@ _profile_fetch_from_conf(void)
|
||||||
Eet_File *ef = NULL;
|
Eet_File *ef = NULL;
|
||||||
int len = 0, i;
|
int len = 0, i;
|
||||||
|
|
||||||
if (_use_build_config) goto end;
|
if (_running_in_tree) goto end;
|
||||||
// if env var - use profile without question
|
// if env var - use profile without question
|
||||||
s = _getenv_once("ELM_PROFILE");
|
s = _getenv_once("ELM_PROFILE");
|
||||||
if (s)
|
if (s)
|
||||||
|
@ -1769,7 +1769,7 @@ _config_load(void)
|
||||||
efl_provider_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
|
efl_provider_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
|
||||||
efl_provider_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
|
efl_provider_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
|
||||||
efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del);
|
efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del);
|
||||||
if (!_use_build_config)
|
if (!_running_in_tree)
|
||||||
{
|
{
|
||||||
_elm_config = _config_user_load();
|
_elm_config = _config_user_load();
|
||||||
if (_elm_config)
|
if (_elm_config)
|
||||||
|
@ -2127,7 +2127,7 @@ _elm_config_profile_save(const char *profile)
|
||||||
Eet_File *ef;
|
Eet_File *ef;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
if (_use_build_config || ((s = _getenv_once("ELM_PROFILE_NOSAVE")) && atoi(s)))
|
if (_running_in_tree || ((s = _getenv_once("ELM_PROFILE_NOSAVE")) && atoi(s)))
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
||||||
len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg");
|
len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg");
|
||||||
|
@ -3083,7 +3083,7 @@ elm_config_profile_exists(const char *profile)
|
||||||
|
|
||||||
if (!profile) return EINA_FALSE;
|
if (!profile) return EINA_FALSE;
|
||||||
|
|
||||||
if (_use_build_config)
|
if (_running_in_tree)
|
||||||
{
|
{
|
||||||
if (!bs_data_path_get(buf, sizeof(buf), "elementary/config", profile)) return EINA_FALSE;
|
if (!bs_data_path_get(buf, sizeof(buf), "elementary/config", profile)) return EINA_FALSE;
|
||||||
return ecore_file_exists(buf);
|
return ecore_file_exists(buf);
|
||||||
|
@ -4193,7 +4193,7 @@ elm_config_all_flush(void)
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
if (_use_build_config) return;
|
if (_running_in_tree) return;
|
||||||
len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "themes/");
|
len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "themes/");
|
||||||
if (len + 1 >= sizeof(buf))
|
if (len + 1 >= sizeof(buf))
|
||||||
return;
|
return;
|
||||||
|
@ -4300,7 +4300,7 @@ _elm_config_sub_shutdown(void)
|
||||||
ELM_SAFE_FREE(_monitor_file_created_handler, ecore_event_handler_del);
|
ELM_SAFE_FREE(_monitor_file_created_handler, ecore_event_handler_del);
|
||||||
ELM_SAFE_FREE(_monitor_file_modified_handler, ecore_event_handler_del);
|
ELM_SAFE_FREE(_monitor_file_modified_handler, ecore_event_handler_del);
|
||||||
ELM_SAFE_FREE(_monitor_directory_created_handler, ecore_event_handler_del);
|
ELM_SAFE_FREE(_monitor_directory_created_handler, ecore_event_handler_del);
|
||||||
_use_build_config = EINA_FALSE;
|
_running_in_tree = EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
|
@ -4392,7 +4392,7 @@ _elm_config_sub_init(void)
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
|
|
||||||
if (_use_build_config)
|
if (_running_in_tree)
|
||||||
ok = bs_data_path_get(buf, sizeof(buf), "elementary", "config");
|
ok = bs_data_path_get(buf, sizeof(buf), "elementary", "config");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
# define LIBEXT ".so"
|
# define LIBEXT ".so"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Eina_Bool _use_build_config;
|
Eina_Bool _running_in_tree;
|
||||||
|
|
||||||
static Elm_Version _version = { VMAJ, VMIN, VMIC, VREV };
|
static Elm_Version _version = { VMAJ, VMIN, VMIC, VREV };
|
||||||
EAPI Elm_Version *elm_version = &_version;
|
EAPI Elm_Version *elm_version = &_version;
|
||||||
|
@ -786,7 +786,7 @@ elm_quicklaunch_init(int argc EINA_UNUSED,
|
||||||
{
|
{
|
||||||
_elm_ql_init_count++;
|
_elm_ql_init_count++;
|
||||||
if (_elm_ql_init_count > 1) return _elm_ql_init_count;
|
if (_elm_ql_init_count > 1) return _elm_ql_init_count;
|
||||||
_use_build_config = !!getenv("EFL_RUN_IN_TREE");
|
_running_in_tree = !!getenv("EFL_RUN_IN_TREE");
|
||||||
EINA_SAFETY_ON_FALSE_GOTO(eina_init(), fail_eina);
|
EINA_SAFETY_ON_FALSE_GOTO(eina_init(), fail_eina);
|
||||||
_elm_log_dom = eina_log_domain_register("elementary", EINA_COLOR_LIGHTBLUE);
|
_elm_log_dom = eina_log_domain_register("elementary", EINA_COLOR_LIGHTBLUE);
|
||||||
EINA_SAFETY_ON_TRUE_GOTO(_elm_log_dom < 0, fail_eina_log);
|
EINA_SAFETY_ON_TRUE_GOTO(_elm_log_dom < 0, fail_eina_log);
|
||||||
|
@ -829,7 +829,7 @@ elm_quicklaunch_init(int argc EINA_UNUSED,
|
||||||
LOCALE_DIR);
|
LOCALE_DIR);
|
||||||
if (pfx)
|
if (pfx)
|
||||||
{
|
{
|
||||||
if (_use_build_config)
|
if (_running_in_tree)
|
||||||
_elm_data_dir = eina_stringshare_add(PACKAGE_BUILD_DIR "/data/elementary");
|
_elm_data_dir = eina_stringshare_add(PACKAGE_BUILD_DIR "/data/elementary");
|
||||||
else
|
else
|
||||||
_elm_data_dir = eina_stringshare_add(eina_prefix_data_get(pfx));
|
_elm_data_dir = eina_stringshare_add(eina_prefix_data_get(pfx));
|
||||||
|
|
|
@ -919,7 +919,7 @@ _elm_dgettext(const char *string)
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
extern Eina_Bool _use_build_config;
|
extern Eina_Bool _running_in_tree;
|
||||||
|
|
||||||
/* Used by the paste handler */
|
/* Used by the paste handler */
|
||||||
void _elm_entry_entry_paste(Evas_Object *obj, const char *entry);
|
void _elm_entry_entry_paste(Evas_Object *obj, const char *entry);
|
||||||
|
|
Loading…
Reference in New Issue