devilhorns pushed a commit to branch master.

http://git.enlightenment.org/apps/express.git/commit/?id=f4f969feec4c0de3d425a76bf311dfac3c63b348

commit f4f969feec4c0de3d425a76bf311dfac3c63b348
Author: Christopher Michael <devilho...@comcast.net>
Date:   Wed Jan 27 13:18:46 2021 -0500

    express: Fix config saving
    
    So apparently the problem with express not saving it's config was due
    to PEBKAC :( We should only be setting defaults (and thus nuking
    Networks) if we are saving a new default config file
---
 src/bin/config.c | 77 +++++++++++++++++++++++++++++---------------------------
 1 file changed, 40 insertions(+), 37 deletions(-)

diff --git a/src/bin/config.c b/src/bin/config.c
index fec07b6..d50a219 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -260,43 +260,46 @@ _config_load(void)
 #define IFCFGELSE } else {
 #define IFCFGEND }
 
-   /* setup defaults */
-   _ex_cfg->font.size = 10;
-   _ex_cfg->font.bitmap = EINA_TRUE;
-   _ex_cfg->font.name = eina_stringshare_add("nexus.pcf");
-   _ex_cfg->gui.translucent = EINA_TRUE;
-   _ex_cfg->gui.opacity = 70;
-   _ex_cfg->gui.zoom = 0.5;
-   _ex_cfg->gui.scrollback = 2000;
-   _ex_cfg->networks = NULL;
-
-   IFCFG(1);
-   _ex_cfg->gui.tabs = 1;
-   IFCFGEND;
-
-   IFCFG(2);
-   _ex_cfg->gui.use_gravatar = EINA_TRUE;
-   IFCFGEND;
-
-   IFCFG(3);
-   _ex_cfg->font.use_entry = EINA_TRUE;
-   IFCFGEND;
-
-   IFCFG(4);
-   _ex_cfg->video.module = 0;
-   _ex_cfg->video.muted = EINA_FALSE;
-   _ex_cfg->video.visualized = EINA_TRUE;
-   IFCFGEND;
-
-   /* limit config values so they are sane */
-   EX_CONFIG_LIMIT(_ex_cfg->font.size, 3, 400);
-   EX_CONFIG_LIMIT(_ex_cfg->gui.zoom, 0.1, 1.0);
-   EX_CONFIG_LIMIT(_ex_cfg->gui.scrollback, 0, 200000);
-   EX_CONFIG_LIMIT(_ex_cfg->video.module, 0, 4);
-
-   _ex_cfg->version = EX_CONFIG_FILE_VERSION;
-
-   if (save) _config_save();
+   if (save)
+     {
+        /* setup defaults */
+        _ex_cfg->font.size = 10;
+        _ex_cfg->font.bitmap = EINA_TRUE;
+        _ex_cfg->font.name = eina_stringshare_add("nexus.pcf");
+        _ex_cfg->gui.translucent = EINA_TRUE;
+        _ex_cfg->gui.opacity = 70;
+        _ex_cfg->gui.zoom = 0.5;
+        _ex_cfg->gui.scrollback = 2000;
+        _ex_cfg->networks = NULL;
+
+        IFCFG(1);
+        _ex_cfg->gui.tabs = 1;
+        IFCFGEND;
+
+        IFCFG(2);
+        _ex_cfg->gui.use_gravatar = EINA_TRUE;
+        IFCFGEND;
+
+        IFCFG(3);
+        _ex_cfg->font.use_entry = EINA_TRUE;
+        IFCFGEND;
+
+        IFCFG(4);
+        _ex_cfg->video.module = 0;
+        _ex_cfg->video.muted = EINA_FALSE;
+        _ex_cfg->video.visualized = EINA_TRUE;
+        IFCFGEND;
+
+        /* limit config values so they are sane */
+        EX_CONFIG_LIMIT(_ex_cfg->font.size, 3, 400);
+        EX_CONFIG_LIMIT(_ex_cfg->gui.zoom, 0.1, 1.0);
+        EX_CONFIG_LIMIT(_ex_cfg->gui.scrollback, 0, 200000);
+        EX_CONFIG_LIMIT(_ex_cfg->video.module, 0, 4);
+
+        _ex_cfg->version = EX_CONFIG_FILE_VERSION;
+
+        _config_save();
+     }
 }
 
 void 

-- 


Reply via email to