config: handle is_mirrored, and translate are not part of EET file, when config flush... 27/90827/2
authorShinwoo Kim <cinoo.kim@samsung.com>
Sat, 5 Mar 2016 00:00:06 +0000 (16:00 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 5 Oct 2016 07:37:29 +0000 (00:37 -0700)
Summary: is_mirrored, and translate value is reset, when config flush occurs.

Reviewers: raster, cedric, jpeg, tasn

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D3748

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Conflicts:
src/lib/elm_config.c

Change-Id: Ia9afd256940505d75684f112b8dd15155c5e5af0

src/lib/elm_config.c

index 4129cfa..b93fd8f 100644 (file)
@@ -1831,8 +1831,12 @@ static void
 _config_flush_get(void)
 {
    double pre_scale;
+   Eina_Bool is_mirrored;
+   Eina_Bool translate;
 
    pre_scale = _elm_config->scale;
+   is_mirrored = _elm_config->is_mirrored;
+   translate = _elm_config->translate;
 
    _elm_config_font_overlays_cancel();
    _color_overlays_cancel();
@@ -1840,6 +1844,11 @@ _config_flush_get(void)
    _elm_config = NULL;
    _config_load();
    _env_get();
+
+   /* restore prev value which is not part of the EET file */
+   _elm_config->is_mirrored = is_mirrored;
+   _elm_config->translate = translate;
+
    _config_apply();
    _config_sub_apply();
    evas_font_reinit();
@@ -3673,7 +3682,7 @@ elm_config_all_flush(void)
 }
 
 static void
-_translation_init()
+_translation_init(void)
 {
 #ifdef ENABLE_NLS
    const char *cur_dom = textdomain(NULL);
@@ -3907,9 +3916,19 @@ end:
 void
 _elm_config_reload(void)
 {
+   Eina_Bool is_mirrored;
+   Eina_Bool translate;
+   is_mirrored = _elm_config->is_mirrored;
+   translate = _elm_config->translate;
+
    _config_free(_elm_config);
    _elm_config = NULL;
    _config_load();
+
+   /* restore prev value which is not part of the EET file */
+   _elm_config->is_mirrored = is_mirrored;
+   _elm_config->translate = translate;
+
    _config_apply();
    _elm_config_font_overlay_apply();
    _elm_config_color_overlay_apply();
@@ -4103,6 +4122,11 @@ elm_config_transition_duration_factor_get(void)
 void
 _elm_config_profile_set(const char *profile)
 {
+   Eina_Bool is_mirrored;
+   Eina_Bool translate;
+   is_mirrored = _elm_config->is_mirrored;
+   translate = _elm_config->translate;
+
    if (!profile) return;
 
    if (_elm_profile)
@@ -4119,6 +4143,11 @@ _elm_config_profile_set(const char *profile)
    _config_free(_elm_config);
    _elm_config = NULL;
    _config_load();
+
+   /* restore prev value which is not part of the EET file */
+   _elm_config->is_mirrored = is_mirrored;
+   _elm_config->translate = translate;
+
    _config_apply();
    _elm_config_font_overlay_apply();
    _elm_config_color_overlay_apply();