summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_config.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-09-24 16:59:49 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-09-24 17:12:01 -0400
commite94686b27655bd12496160c2d82c0308bc74c4b2 (patch)
tree80afa56a4091891a547a12ae70b4b191a6842091 /src/lib/elementary/elm_config.c
parentd13bd5fa8e7e6ee844a931424c4db42fa2c9d2c6 (diff)
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
Diffstat (limited to 'src/lib/elementary/elm_config.c')
-rw-r--r--src/lib/elementary/elm_config.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index bbc6b9f668..fc9b0d54b9 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -994,7 +994,7 @@ _elm_config_profile_dir_get(const char *prof,
994 if (!is_user) 994 if (!is_user)
995 goto not_user; 995 goto not_user;
996 996
997 if ((!_use_build_config) || (!bs_data_path_get(buf, sizeof(buf), "elementary/config", prof))) 997 if ((!_running_in_tree) || (!bs_data_path_get(buf, sizeof(buf), "elementary/config", prof)))
998 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s", prof); 998 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s", prof);
999 999
1000 // See elm_config_profile_dir_free: always use strdup+free 1000 // See elm_config_profile_dir_free: always use strdup+free
@@ -1004,7 +1004,7 @@ _elm_config_profile_dir_get(const char *prof,
1004 return NULL; 1004 return NULL;
1005 1005
1006not_user: 1006not_user:
1007 if ((!_use_build_config) || (!bs_data_path_get(buf, sizeof(buf), "elementary/config", prof))) 1007 if ((!_running_in_tree) || (!bs_data_path_get(buf, sizeof(buf), "elementary/config", prof)))
1008 snprintf(buf, sizeof(buf), "%s/config/%s", _elm_data_dir, prof); 1008 snprintf(buf, sizeof(buf), "%s/config/%s", _elm_data_dir, prof);
1009 1009
1010 // See elm_config_profile_dir_free: always use strdup+free 1010 // See elm_config_profile_dir_free: always use strdup+free
@@ -1389,7 +1389,7 @@ _elm_config_profiles_list(Eina_Bool hide_profiles)
1389 const char *dir; 1389 const char *dir;
1390 size_t len = 0; 1390 size_t len = 0;
1391 1391
1392 if (_use_build_config) 1392 if (_running_in_tree)
1393 { 1393 {
1394 len = bs_data_path_get(buf, sizeof(buf), "elementary", "config"); 1394 len = bs_data_path_get(buf, sizeof(buf), "elementary", "config");
1395 if (len) len = strlen(buf); 1395 if (len) len = strlen(buf);
@@ -1477,7 +1477,7 @@ _profile_fetch_from_conf(void)
1477 Eet_File *ef = NULL; 1477 Eet_File *ef = NULL;
1478 int len = 0, i; 1478 int len = 0, i;
1479 1479
1480 if (_use_build_config) goto end; 1480 if (_running_in_tree) goto end;
1481 // if env var - use profile without question 1481 // if env var - use profile without question
1482 s = _getenv_once("ELM_PROFILE"); 1482 s = _getenv_once("ELM_PROFILE");
1483 if (s) 1483 if (s)
@@ -1769,7 +1769,7 @@ _config_load(void)
1769 efl_provider_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj); 1769 efl_provider_register(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
1770 efl_provider_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj); 1770 efl_provider_register(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
1771 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del); 1771 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del);
1772 if (!_use_build_config) 1772 if (!_running_in_tree)
1773 { 1773 {
1774 _elm_config = _config_user_load(); 1774 _elm_config = _config_user_load();
1775 if (_elm_config) 1775 if (_elm_config)
@@ -2127,7 +2127,7 @@ _elm_config_profile_save(const char *profile)
2127 Eet_File *ef; 2127 Eet_File *ef;
2128 size_t len; 2128 size_t len;
2129 2129
2130 if (_use_build_config || ((s = _getenv_once("ELM_PROFILE_NOSAVE")) && atoi(s))) 2130 if (_running_in_tree || ((s = _getenv_once("ELM_PROFILE_NOSAVE")) && atoi(s)))
2131 return EINA_TRUE; 2131 return EINA_TRUE;
2132 2132
2133 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg"); 2133 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg");
@@ -3083,7 +3083,7 @@ elm_config_profile_exists(const char *profile)
3083 3083
3084 if (!profile) return EINA_FALSE; 3084 if (!profile) return EINA_FALSE;
3085 3085
3086 if (_use_build_config) 3086 if (_running_in_tree)
3087 { 3087 {
3088 if (!bs_data_path_get(buf, sizeof(buf), "elementary/config", profile)) return EINA_FALSE; 3088 if (!bs_data_path_get(buf, sizeof(buf), "elementary/config", profile)) return EINA_FALSE;
3089 return ecore_file_exists(buf); 3089 return ecore_file_exists(buf);
@@ -4193,7 +4193,7 @@ elm_config_all_flush(void)
4193 int ok = 0; 4193 int ok = 0;
4194 size_t len; 4194 size_t len;
4195 4195
4196 if (_use_build_config) return; 4196 if (_running_in_tree) return;
4197 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "themes/"); 4197 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "themes/");
4198 if (len + 1 >= sizeof(buf)) 4198 if (len + 1 >= sizeof(buf))
4199 return; 4199 return;
@@ -4300,7 +4300,7 @@ _elm_config_sub_shutdown(void)
4300 ELM_SAFE_FREE(_monitor_file_created_handler, ecore_event_handler_del); 4300 ELM_SAFE_FREE(_monitor_file_created_handler, ecore_event_handler_del);
4301 ELM_SAFE_FREE(_monitor_file_modified_handler, ecore_event_handler_del); 4301 ELM_SAFE_FREE(_monitor_file_modified_handler, ecore_event_handler_del);
4302 ELM_SAFE_FREE(_monitor_directory_created_handler, ecore_event_handler_del); 4302 ELM_SAFE_FREE(_monitor_directory_created_handler, ecore_event_handler_del);
4303 _use_build_config = EINA_FALSE; 4303 _running_in_tree = EINA_FALSE;
4304} 4304}
4305 4305
4306static Eina_Bool 4306static Eina_Bool
@@ -4392,7 +4392,7 @@ _elm_config_sub_init(void)
4392 char buf[PATH_MAX]; 4392 char buf[PATH_MAX];
4393 int ok = 0; 4393 int ok = 0;
4394 4394
4395 if (_use_build_config) 4395 if (_running_in_tree)
4396 ok = bs_data_path_get(buf, sizeof(buf), "elementary", "config"); 4396 ok = bs_data_path_get(buf, sizeof(buf), "elementary", "config");
4397 else 4397 else
4398 { 4398 {