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
This commit is contained in:
parent
02e53a27e6
commit
f4f969feec
|
@ -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;
|
||||
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(1);
|
||||
_ex_cfg->gui.tabs = 1;
|
||||
IFCFGEND;
|
||||
|
||||
IFCFG(2);
|
||||
_ex_cfg->gui.use_gravatar = EINA_TRUE;
|
||||
IFCFGEND;
|
||||
IFCFG(2);
|
||||
_ex_cfg->gui.use_gravatar = EINA_TRUE;
|
||||
IFCFGEND;
|
||||
|
||||
IFCFG(3);
|
||||
_ex_cfg->font.use_entry = 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;
|
||||
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);
|
||||
/* 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;
|
||||
_ex_cfg->version = EX_CONFIG_FILE_VERSION;
|
||||
|
||||
if (save) _config_save();
|
||||
_config_save();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue