summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorWonki Kim <wonki_.kim@samsung.com>2018-11-27 04:49:27 +0000
committerCedric BAIL <cedric@osg.samsung.com>2018-11-28 16:22:18 -0800
commit8b0b9ed2819588fbf81299b784a600c6ac7ccd13 (patch)
tree733341eb3d6814a34ec6a04420d49b9781fd1308 /src/lib/elementary
parent43b18dc8903a79f091a39b6ed12f8aa82f23648a (diff)
elm_config: fix elm_config_save not to wake idle processes up
there is a eio_monitor which is tracking on config directory. and that is the reason why idle processes get waken up once some process call elm_config_save(). this patch fix the function not to wake idle processes up as it was before. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7354
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_win.c1
-rw-r--r--src/lib/elementary/elm_config.c253
-rw-r--r--src/lib/elementary/elm_priv.h2
3 files changed, 172 insertions, 84 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 878d504eb1..712238e04b 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1485,6 +1485,7 @@ _elm_win_profile_update(Efl_Ui_Win_Data *sd)
1485 1485
1486 _config_profile_lock = EINA_TRUE; 1486 _config_profile_lock = EINA_TRUE;
1487 _elm_config_profile_set(sd->profile.name); 1487 _elm_config_profile_set(sd->profile.name);
1488 _config_profile_lock = EINA_FALSE;
1488 1489
1489 /* update sub ee */ 1490 /* update sub ee */
1490 Ecore_Evas *ee2; 1491 Ecore_Evas *ee2;
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 963f17666a..13e80fd5da 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -5,6 +5,8 @@
5#include <Elementary.h> 5#include <Elementary.h>
6#include "elm_priv.h" 6#include "elm_priv.h"
7#include <pwd.h> 7#include <pwd.h>
8#include <fcntl.h>
9
8 10
9#include "efl_config_global.eo.h" 11#include "efl_config_global.eo.h"
10 12
@@ -34,8 +36,7 @@ static void _elm_config_key_binding_hash(void);
34Eina_Bool _config_profile_lock = EINA_FALSE; 36Eina_Bool _config_profile_lock = EINA_FALSE;
35static Ecore_Timer *_config_change_delay_timer = NULL; 37static Ecore_Timer *_config_change_delay_timer = NULL;
36static Ecore_Timer *_config_profile_change_delay_timer = NULL; 38static Ecore_Timer *_config_profile_change_delay_timer = NULL;
37static Ecore_Event_Handler *_monitor_file_created_handler = NULL; 39static Ecore_Event_Handler *_monitor_file_modified_handler = NULL;
38static Ecore_Event_Handler *_monitor_directory_created_handler = NULL;
39static Eio_Monitor *_eio_config_monitor = NULL; 40static Eio_Monitor *_eio_config_monitor = NULL;
40static Eio_Monitor *_eio_profile_monitor = NULL; 41static Eio_Monitor *_eio_profile_monitor = NULL;
41 42
@@ -188,6 +189,7 @@ static void _config_sub_apply(void);
188static void _config_update(void); 189static void _config_update(void);
189static void _env_get(void); 190static void _env_get(void);
190static void _color_overlays_cancel(void); 191static void _color_overlays_cancel(void);
192static Eina_Bool _file_touch(const char *file);
191 193
192#define ELM_CONFIG_VAL(edd, type, member, dtype) \ 194#define ELM_CONFIG_VAL(edd, type, member, dtype) \
193 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, type, #member, member, dtype) 195 EET_DATA_DESCRIPTOR_ADD_BASIC(edd, type, #member, member, dtype)
@@ -1617,20 +1619,19 @@ _elm_recache(void)
1617} 1619}
1618 1620
1619static Elm_Config * 1621static Elm_Config *
1620_config_user_load(void) 1622_config_user_load(Eina_Bool on_flush)
1621{ 1623{
1622 Elm_Config *cfg = NULL; 1624 Elm_Config *cfg = NULL;
1623 Eet_File *ef; 1625 Eet_File *ef;
1624 char buf[PATH_MAX]; 1626 char buf[PATH_MAX];
1625 1627
1626 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s", 1628 if (on_flush)
1627 _elm_profile); 1629 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/.base.flush.cfg",
1628 ecore_file_mkpath(buf); 1630 _elm_profile);
1629 if (_eio_config_monitor) eio_monitor_del(_eio_config_monitor);
1630 _eio_config_monitor = eio_monitor_add(buf);
1631 1631
1632 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/base.cfg", 1632 if (!ecore_file_exists(buf) || !on_flush)
1633 _elm_profile); 1633 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/base.cfg",
1634 _elm_profile);
1634 1635
1635 ef = eet_open(buf, EET_FILE_MODE_READ); 1636 ef = eet_open(buf, EET_FILE_MODE_READ);
1636 if (ef) 1637 if (ef)
@@ -1683,7 +1684,7 @@ _efl_config_obj_del(Eo *obj EINA_UNUSED)
1683} 1684}
1684 1685
1685static void 1686static void
1686_config_load(void) 1687_config_load(Eina_Bool on_flush)
1687{ 1688{
1688 if (_efl_config_obj) 1689 if (_efl_config_obj)
1689 { 1690 {
@@ -1702,7 +1703,7 @@ _config_load(void)
1702 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del); 1703 efl_del_intercept_set(_efl_config_obj, _efl_config_obj_del);
1703 if (!_use_build_config) 1704 if (!_use_build_config)
1704 { 1705 {
1705 _elm_config = _config_user_load(); 1706 _elm_config = _config_user_load(on_flush);
1706 if (_elm_config) 1707 if (_elm_config)
1707 { 1708 {
1708 if ((_elm_config->config_version >> ELM_CONFIG_VERSION_EPOCH_OFFSET) < ELM_CONFIG_EPOCH) 1709 if ((_elm_config->config_version >> ELM_CONFIG_VERSION_EPOCH_OFFSET) < ELM_CONFIG_EPOCH)
@@ -1871,13 +1872,13 @@ _config_load(void)
1871} 1872}
1872 1873
1873static void 1874static void
1874_elm_config_reload_do(void) 1875_elm_config_reload_do(Eina_Bool on_flush)
1875{ 1876{
1876 Elm_Config *prev_config; 1877 Elm_Config *prev_config;
1877 1878
1878 prev_config = _elm_config; 1879 prev_config = _elm_config;
1879 _elm_config = NULL; 1880 _elm_config = NULL;
1880 _config_load(); 1881 _config_load(on_flush);
1881 if ((prev_config) && (_elm_config)) 1882 if ((prev_config) && (_elm_config))
1882 { 1883 {
1883#define KEEP_VAL(xxx) \ 1884#define KEEP_VAL(xxx) \
@@ -2096,7 +2097,7 @@ _config_flush_get(void)
2096 _elm_config_font_overlays_cancel(); 2097 _elm_config_font_overlays_cancel();
2097 _color_overlays_cancel(); 2098 _color_overlays_cancel();
2098 2099
2099 _elm_config_reload_do(); 2100 _elm_config_reload_do(EINA_TRUE);
2100 2101
2101 /* restore prev value which is not part of the EET file */ 2102 /* restore prev value which is not part of the EET file */
2102 _elm_config->is_mirrored = is_mirrored; 2103 _elm_config->is_mirrored = is_mirrored;
@@ -2180,6 +2181,35 @@ _elm_config_eet_close_error_get(Eet_File *ef,
2180 return NULL; 2181 return NULL;
2181} 2182}
2182 2183
2184static char *
2185_elm_config_profile_name_get()
2186{
2187 char buf[PATH_MAX], *p, *s;
2188 Eet_File *ef = NULL;
2189 int len = 0, i;
2190 char *rst = NULL;
2191
2192 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg");
2193
2194 ef = eet_open(buf, EET_FILE_MODE_READ);
2195 if (ef)
2196 {
2197 p = eet_read(ef, "config", &len);
2198 if (p)
2199 {
2200 rst = calloc(1, len+1);
2201 memcpy(rst, p, len);
2202 rst[len] = '\0';
2203 }
2204 eet_close(ef);
2205 }
2206
2207 if (rst)
2208 return rst;
2209 else
2210 return strdup("default");
2211}
2212
2183static Eina_Bool 2213static Eina_Bool
2184_elm_config_profile_save(const char *profile) 2214_elm_config_profile_save(const char *profile)
2185{ 2215{
@@ -2189,43 +2219,50 @@ _elm_config_profile_save(const char *profile)
2189 const char *err, *s; 2219 const char *err, *s;
2190 Eet_File *ef; 2220 Eet_File *ef;
2191 size_t len; 2221 size_t len;
2222 char *_file_profile = NULL;
2192 2223
2193 if ((s = getenv("ELM_PROFILE_NOSAVE")) && atoi(s)) 2224 if ((s = getenv("ELM_PROFILE_NOSAVE")) && atoi(s))
2194 return EINA_TRUE; 2225 return EINA_TRUE;
2195 2226
2196 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg"); 2227 _file_profile = _elm_config_profile_name_get();
2197 if (len + 1 >= sizeof(buf))
2198 return EINA_FALSE;
2199 2228
2200 len = _elm_config_user_dir_snprintf(buf2, sizeof(buf2), 2229 if (!_file_profile || strcmp(_elm_profile, _file_profile))
2201 "config/profile.cfg.tmp"); 2230 {
2202 if (len + 1 >= sizeof(buf2)) 2231 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg");
2203 return EINA_FALSE; 2232 if (len + 1 >= sizeof(buf))
2233 return EINA_FALSE;
2204 2234
2205 ef = eet_open(buf2, EET_FILE_MODE_WRITE); 2235 len = _elm_config_user_dir_snprintf(buf2, sizeof(buf2),
2206 if (!ef) 2236 "config/profile.cfg.tmp");
2207 return EINA_FALSE; 2237 if (len + 1 >= sizeof(buf2))
2238 return EINA_FALSE;
2208 2239
2209 ok = eet_write(ef, "config", _elm_profile, strlen(_elm_profile), 0); 2240 ef = eet_open(buf2, EET_FILE_MODE_WRITE);
2210 if (!ok) 2241 if (!ef)
2211 goto err; 2242 return EINA_FALSE;
2212 2243
2213 err = _elm_config_eet_close_error_get(ef, buf2); 2244 ok = eet_write(ef, "config", _elm_profile, strlen(_elm_profile), 0);
2214 if (err) 2245 if (!ok)
2215 { 2246 goto err;
2216 ERR("%s", err);
2217 free((void *)err);
2218 goto err;
2219 }
2220 2247
2221 ret = ecore_file_cp(buf2, buf); 2248 err = _elm_config_eet_close_error_get(ef, buf2);
2222 if (!ret) 2249 if (err)
2223 { 2250 {
2224 ERR("Error saving Elementary's configuration profile file"); 2251 ERR("%s", err);
2225 goto err; 2252 free((void *)err);
2226 } 2253 goto err;
2254 }
2227 2255
2228 ecore_file_unlink(buf2); 2256 ret = ecore_file_cp(buf2, buf);
2257 if (!ret)
2258 {
2259 ERR("Error saving Elementary's configuration profile file");
2260 goto err;
2261 }
2262
2263 ecore_file_unlink(buf2);
2264 }
2265 free(_file_profile);
2229 2266
2230 derived = _elm_config_derived_load(profile ? profile : _elm_profile); 2267 derived = _elm_config_derived_load(profile ? profile : _elm_profile);
2231 if (derived) 2268 if (derived)
@@ -3051,7 +3088,7 @@ elm_config_save(void)
3051EAPI void 3088EAPI void
3052elm_config_reload(void) 3089elm_config_reload(void)
3053{ 3090{
3054 _elm_config_reload(); 3091 _elm_config_reload(EINA_FALSE);
3055} 3092}
3056 3093
3057EAPI const char * 3094EAPI const char *
@@ -4190,9 +4227,10 @@ elm_config_popup_scrollable_set(Eina_Bool scrollable)
4190EAPI void 4227EAPI void
4191elm_config_all_flush(void) 4228elm_config_all_flush(void)
4192{ 4229{
4193 char buf[PATH_MAX]; 4230 char buf[PATH_MAX], buf2[PATH_MAX];
4194 int ok = 0; 4231 int ok = 0;
4195 size_t len; 4232 size_t len;
4233 Eet_File *ef = NULL;
4196 4234
4197 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "themes/"); 4235 len = _elm_config_user_dir_snprintf(buf, sizeof(buf), "themes/");
4198 if (len + 1 >= sizeof(buf)) 4236 if (len + 1 >= sizeof(buf))
@@ -4224,6 +4262,27 @@ elm_config_all_flush(void)
4224 return; 4262 return;
4225 } 4263 }
4226 4264
4265 _elm_config_user_dir_snprintf(buf, sizeof(buf),
4266 "config/%s/.base.flush.cfg.tmp", _elm_profile);
4267
4268 _elm_config_user_dir_snprintf(buf2, sizeof(buf2),
4269 "config/%s/.base.flush.cfg", _elm_profile);
4270
4271 ef = eet_open(buf, EET_FILE_MODE_WRITE);
4272 if (ef)
4273 {
4274 ok = eet_data_write(ef, _config_edd, "config", _elm_config, 1);
4275 if (!ok)
4276 {
4277 eet_close(ef);
4278 ERR("Failed to save config");
4279 return;
4280 }
4281 eet_close(ef);
4282 ecore_file_cp(buf, buf2);
4283 }
4284 ecore_file_unlink(buf);
4285
4227 elm_config_save(); 4286 elm_config_save();
4228 return; 4287 return;
4229} 4288}
@@ -4269,7 +4328,7 @@ _elm_config_init(void)
4269 _desc_init(); 4328 _desc_init();
4270 _elm_config_profile_derived_init(); 4329 _elm_config_profile_derived_init();
4271 _profile_fetch_from_conf(); 4330 _profile_fetch_from_conf();
4272 _config_load(); 4331 _config_load(EINA_FALSE);
4273 if (_elm_config) _env_get(); 4332 if (_elm_config) _env_get();
4274 ELM_SAFE_FREE(_elm_accel_preference, eina_stringshare_del); 4333 ELM_SAFE_FREE(_elm_accel_preference, eina_stringshare_del);
4275 ELM_SAFE_FREE(_elm_gl_preference, eina_stringshare_del); 4334 ELM_SAFE_FREE(_elm_gl_preference, eina_stringshare_del);
@@ -4297,17 +4356,27 @@ _elm_config_sub_shutdown(void)
4297 ELM_SAFE_FREE(_eio_profile_monitor, eio_monitor_del); 4356 ELM_SAFE_FREE(_eio_profile_monitor, eio_monitor_del);
4298 ELM_SAFE_FREE(_config_change_delay_timer, ecore_timer_del); 4357 ELM_SAFE_FREE(_config_change_delay_timer, ecore_timer_del);
4299 ELM_SAFE_FREE(_config_profile_change_delay_timer, ecore_timer_del); 4358 ELM_SAFE_FREE(_config_profile_change_delay_timer, ecore_timer_del);
4300 ELM_SAFE_FREE(_monitor_file_created_handler, ecore_event_handler_del); 4359 ELM_SAFE_FREE(_monitor_file_modified_handler, ecore_event_handler_del);
4301 ELM_SAFE_FREE(_monitor_directory_created_handler, ecore_event_handler_del);
4302} 4360}
4303 4361
4304static Eina_Bool 4362static Eina_Bool
4305_config_profile_change_delay_cb(void *data EINA_UNUSED) 4363_config_profile_change_delay_cb(void *data EINA_UNUSED)
4306{ 4364{
4307 char *pprof = NULL; 4365 char *pprof = NULL;
4366 char buf[PATH_MAX];
4308 4367
4309 if (_elm_profile) pprof = strdup(_elm_profile); 4368 if (_elm_profile) pprof = strdup(_elm_profile);
4310 _profile_fetch_from_conf(); 4369 _profile_fetch_from_conf();
4370
4371 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/base.cfg", _elm_profile);
4372 if(!ecore_file_exists(buf)) _file_touch(buf);
4373
4374 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/.base.flush.cfg", _elm_profile);
4375 if(!ecore_file_exists(buf)) _file_touch(buf);
4376
4377 ELM_SAFE_FREE(_eio_config_monitor, eio_monitor_del);
4378 _eio_config_monitor = eio_monitor_add(buf);
4379
4311 if ((!pprof) || (!(!strcmp(pprof, _elm_profile)))) 4380 if ((!pprof) || (!(!strcmp(pprof, _elm_profile))))
4312 { 4381 {
4313 _config_flush_get(); 4382 _config_flush_get();
@@ -4320,7 +4389,7 @@ _config_profile_change_delay_cb(void *data EINA_UNUSED)
4320static Eina_Bool 4389static Eina_Bool
4321_config_change_delay_cb(void *data EINA_UNUSED) 4390_config_change_delay_cb(void *data EINA_UNUSED)
4322{ 4391{
4323 _elm_config_reload(); 4392 _elm_config_reload(EINA_TRUE);
4324 4393
4325 _config_change_delay_timer = NULL; 4394 _config_change_delay_timer = NULL;
4326 return ECORE_CALLBACK_CANCEL; 4395 return ECORE_CALLBACK_CANCEL;
@@ -4337,40 +4406,21 @@ _elm_config_file_monitor_cb(void *data EINA_UNUSED,
4337 4406
4338 if (ev->monitor == _eio_config_monitor) 4407 if (ev->monitor == _eio_config_monitor)
4339 { 4408 {
4340 if (type == EIO_MONITOR_FILE_CREATED) 4409 if (!strcmp(file, ".base.flush.cfg"))
4341 { 4410 {
4342 if (!strcmp(file, "base.cfg")) 4411 if (_config_change_delay_timer)
4343 { 4412 ecore_timer_del(_config_change_delay_timer);
4344 if (_config_change_delay_timer) 4413 _config_change_delay_timer = ecore_timer_add(0.1, _config_change_delay_cb, NULL);
4345 ecore_timer_del(_config_change_delay_timer);
4346 _config_change_delay_timer = ecore_timer_add(0.1, _config_change_delay_cb, NULL);
4347 }
4348 } 4414 }
4349 } 4415 }
4416
4350 if (ev->monitor == _eio_profile_monitor) 4417 if (ev->monitor == _eio_profile_monitor)
4351 { 4418 {
4352 if (type == EIO_MONITOR_FILE_CREATED) 4419 if (!strcmp(file, "profile.cfg"))
4353 { 4420 {
4354 if ((!_config_profile_lock) && (!strcmp(file, "profile.cfg"))) 4421 if (_config_profile_change_delay_timer)
4355 { 4422 ecore_timer_del(_config_profile_change_delay_timer);
4356 if (_config_profile_change_delay_timer) 4423 _config_profile_change_delay_timer = ecore_timer_add(0.1, _config_profile_change_delay_cb, NULL);
4357 ecore_timer_del(_config_profile_change_delay_timer);
4358 _config_profile_change_delay_timer = ecore_timer_add(0.1, _config_profile_change_delay_cb, NULL);
4359 }
4360 }
4361 else if (type == EIO_MONITOR_DIRECTORY_CREATED)
4362 {
4363 if (!_eio_config_monitor)
4364 {
4365 _eio_config_monitor = eio_monitor_add(ev->filename);
4366 snprintf(buf, sizeof(buf), "%s/base.cfg", ev->filename);
4367 if (ecore_file_exists(buf))
4368 {
4369 if (_config_change_delay_timer)
4370 ecore_timer_del(_config_change_delay_timer);
4371 _config_change_delay_timer = ecore_timer_add(0.1, _config_change_delay_cb, NULL);
4372 }
4373 }
4374 } 4424 }
4375 } 4425 }
4376 4426
@@ -4397,18 +4447,29 @@ _elm_config_sub_init(void)
4397 buf); 4447 buf);
4398 goto end; 4448 goto end;
4399 } 4449 }
4450
4451 _elm_config_profile_save(NULL);
4452
4453 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/profile.cfg");
4454 if(!ecore_file_exists(buf)) _file_touch(buf);
4400 _eio_profile_monitor = eio_monitor_add(buf); 4455 _eio_profile_monitor = eio_monitor_add(buf);
4401 _monitor_file_created_handler = ecore_event_handler_add 4456
4402 (EIO_MONITOR_FILE_CREATED, _elm_config_file_monitor_cb, NULL); 4457 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/base.cfg", _elm_profile);
4403 _monitor_directory_created_handler = ecore_event_handler_add 4458 if(!ecore_file_exists(buf)) _file_touch(buf);
4404 (EIO_MONITOR_DIRECTORY_CREATED, _elm_config_file_monitor_cb, NULL); 4459
4460 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/.base.flush.cfg", _elm_profile);
4461 if(!ecore_file_exists(buf)) _file_touch(buf);
4462 _eio_config_monitor = eio_monitor_add(buf);
4463
4464 _monitor_file_modified_handler = ecore_event_handler_add
4465 (EIO_MONITOR_FILE_MODIFIED, _elm_config_file_monitor_cb, NULL);
4405 4466
4406end: 4467end:
4407 _config_sub_apply(); 4468 _config_sub_apply();
4408} 4469}
4409 4470
4410void 4471void
4411_elm_config_reload(void) 4472_elm_config_reload(Eina_Bool on_flush)
4412{ 4473{
4413 Eina_Bool is_mirrored; 4474 Eina_Bool is_mirrored;
4414 Eina_Bool translate; 4475 Eina_Bool translate;
@@ -4442,7 +4503,7 @@ _elm_config_reload(void)
4442 is_mirrored = _elm_config->is_mirrored; 4503 is_mirrored = _elm_config->is_mirrored;
4443 translate = _elm_config->translate; 4504 translate = _elm_config->translate;
4444 4505
4445 _elm_config_reload_do(); 4506 _elm_config_reload_do(on_flush);
4446 4507
4447 /* restore prev value which is not part of the EET file */ 4508 /* restore prev value which is not part of the EET file */
4448 _elm_config->is_mirrored = is_mirrored; 4509 _elm_config->is_mirrored = is_mirrored;
@@ -4728,6 +4789,7 @@ _elm_config_profile_set(const char *profile)
4728 Eina_Bool translate; 4789 Eina_Bool translate;
4729 is_mirrored = _elm_config->is_mirrored; 4790 is_mirrored = _elm_config->is_mirrored;
4730 translate = _elm_config->translate; 4791 translate = _elm_config->translate;
4792 char buf[PATH_MAX];
4731 4793
4732 if (!profile) return; 4794 if (!profile) return;
4733 4795
@@ -4741,9 +4803,15 @@ _elm_config_profile_set(const char *profile)
4741 4803
4742 _elm_profile = strdup(profile); 4804 _elm_profile = strdup(profile);
4743 4805
4806 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/base.cfg", _elm_profile);
4807 if(!ecore_file_exists(buf)) _file_touch(buf);
4808
4809 _elm_config_user_dir_snprintf(buf, sizeof(buf), "config/%s/.base.flush.cfg", _elm_profile);
4810 if(!ecore_file_exists(buf)) _file_touch(buf);
4811
4744 _color_overlays_cancel(); 4812 _color_overlays_cancel();
4745 4813
4746 _elm_config_reload_do(); 4814 _elm_config_reload_do(EINA_FALSE);
4747 4815
4748 /* restore prev value which is not part of the EET file */ 4816 /* restore prev value which is not part of the EET file */
4749 _elm_config->is_mirrored = is_mirrored; 4817 _elm_config->is_mirrored = is_mirrored;
@@ -5307,6 +5375,25 @@ EOLIAN static void
5307_efl_config_global_profile_derived_del(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, const char *profile) 5375_efl_config_global_profile_derived_del(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, const char *profile)
5308{ 5376{
5309 elm_config_profile_derived_del(profile); 5377 elm_config_profile_derived_del(profile);
5378
5379}
5380static Eina_Bool
5381_file_touch(const char *file)
5382{
5383 if (!file) return EINA_FALSE;
5384
5385 const char *dir = ecore_file_dir_get(file);
5386 if(!dir) return EINA_FALSE;
5387 if(!ecore_file_mkpath(dir)) return EINA_FALSE;
5388
5389 Eo *f = efl_add_ref(EFL_IO_FILE_CLASS, NULL,
5390 efl_file_set(efl_added, file, NULL),
5391 efl_io_file_flags_set(efl_added, O_CREAT|O_RDWR),
5392 efl_io_file_mode_set(efl_added, 0644));
5393 if (!f) return EINA_FALSE;
5394 efl_unref(f);
5395
5396 return EINA_TRUE;
5310} 5397}
5311 5398
5312#include "efl_config_global.eo.c" 5399#include "efl_config_global.eo.c"
diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h
index 665bee0e03..0c34917b88 100644
--- a/src/lib/elementary/elm_priv.h
+++ b/src/lib/elementary/elm_priv.h
@@ -630,7 +630,7 @@ void _elm_config_sub_init(void);
630void _elm_config_shutdown(void); 630void _elm_config_shutdown(void);
631void _elm_config_sub_shutdown(void); 631void _elm_config_sub_shutdown(void);
632Eina_Bool _elm_config_save(Elm_Config *cfg, const char *profile); 632Eina_Bool _elm_config_save(Elm_Config *cfg, const char *profile);
633void _elm_config_reload(void); 633void _elm_config_reload(Eina_Bool on_flush);
634size_t _elm_config_user_dir_snprintf(char *dst, size_t size, 634size_t _elm_config_user_dir_snprintf(char *dst, size_t size,
635 const char *fmt, ...) 635 const char *fmt, ...)
636 EINA_PRINTF(3, 4); 636 EINA_PRINTF(3, 4);