X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/c8ee61b938e106e6638bf5973401fcfa98900286..461b078e13ea3bbbbb4304598137a8ef04a14f29:/settings.c diff --git a/settings.c b/settings.c index 41127b89..736d6775 100644 --- a/settings.c +++ b/settings.c @@ -311,6 +311,9 @@ void save_settings(char *section, int do_host, Config * cfg) write_setting_i(sesskey, "BugDHGEx2", cfg->sshbug_dhgex2); write_setting_i(sesskey, "StampUtmp", cfg->stamp_utmp); write_setting_i(sesskey, "LoginShell", cfg->login_shell); + write_setting_i(sesskey, "ScrollbarOnLeft", cfg->scrollbar_on_left); + write_setting_s(sesskey, "BoldFont", cfg->boldfont); + write_setting_i(sesskey, "ShadowBoldOffset", cfg->shadowboldoffset); close_settings_w(sesskey); } @@ -346,7 +349,23 @@ void load_settings(char *section, int do_host, Config * cfg) break; } - gppi(sesskey, "CloseOnExit", COE_NORMAL, &cfg->close_on_exit); + /* + * CloseOnExit defaults to closing only on a clean exit - but + * unfortunately not on Unix (pterm). On Unix, the exit code of + * a shell is the last exit code of one of its child processes, + * even if it's an interactive shell - so some pterms will + * close and some will not for no particularly good reason. The + * mode is still useful for specialist purposes (running a + * single command in its own pterm), but I don't think it's a + * sane default, unfortunately. + */ + gppi(sesskey, "CloseOnExit", +#ifdef _WINDOWS + COE_NORMAL, +#else + COE_ALWAYS, +#endif + &cfg->close_on_exit); gppi(sesskey, "WarnOnClose", 1, &cfg->warn_on_close); { /* This is two values for backward compatibility with 0.50/0.51 */ @@ -508,7 +527,16 @@ void load_settings(char *section, int do_host, Config * cfg) cfg->colours[i][2] = c2; } } +#ifndef _WINDOWS + /* Non-raw cut and paste of line-drawing chars works badly on the + * current Unix stub implementation of the Unicode functions. + * So I'm going to temporarily set the default to raw mode so + * that the failure mode isn't quite so drastically horrid. + * When Unicode comes in, this can all be put right. */ + gppi(sesskey, "RawCNP", 1, &cfg->rawcnp); +#else gppi(sesskey, "RawCNP", 0, &cfg->rawcnp); +#endif gppi(sesskey, "PasteRTF", 0, &cfg->rtf_paste); gppi(sesskey, "MouseIsXterm", 0, &cfg->mouse_is_xterm); gppi(sesskey, "RectSelect", 0, &cfg->rect_select); @@ -596,6 +624,9 @@ void load_settings(char *section, int do_host, Config * cfg) gppi(sesskey, "BugDHGEx2", BUG_AUTO, &i); cfg->sshbug_dhgex2 = i; gppi(sesskey, "StampUtmp", 1, &cfg->stamp_utmp); gppi(sesskey, "LoginShell", 1, &cfg->login_shell); + gppi(sesskey, "ScrollbarOnLeft", 0, &cfg->scrollbar_on_left); + gpps(sesskey, "BoldFont", "", cfg->boldfont, sizeof(cfg->boldfont)); + gppi(sesskey, "ShadowBoldOffset", -1, &cfg->shadowboldoffset); close_settings_r(sesskey); }