elm config - reload at runtime - fix env var overrides being lost
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 10 Apr 2017 02:05:56 +0000 (11:05 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 10 Apr 2017 02:05:56 +0000 (11:05 +0900)
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

src/lib/elementary/elm_config.c

index 3510ba1..582eb3e 100644 (file)
@@ -1671,6 +1671,7 @@ _config_load(void)
           {
              if (_elm_config->config_version < ELM_CONFIG_VERSION)
                _config_update();
+             _env_get();
              return;
           }
      }
@@ -1679,7 +1680,11 @@ _config_load(void)
     * this one, if it's not the right one, someone screwed up at the time
     * of installing it */
    _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
     * 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->popup_scrollable = EINA_FALSE;
    _elm_config->entry_select_allow = EINA_TRUE;
+   _env_get();
 }
 
 static void