1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-05 21:42:47 -05:00

I'm sick of all those #ifdefs in settings.c, and in any case plink

and pterm need at least one default setting to be _different_ (pterm
needs the default term type to be `xterm', while plink needs it to
be taken from $TERM). So here's a completely new alternative
mechanism for platform- and app-specific default settings. Ben will
probably want to check the integrity of the Mac port, since I've
fiddled with it without testing that it still compiles.

[originally from svn r2513]
This commit is contained in:
Simon Tatham
2003-01-09 18:06:29 +00:00
parent 10c1d43ac6
commit 4d86f5979d
7 changed files with 154 additions and 41 deletions

View File

@ -83,6 +83,23 @@ char *x_get_default(char *key)
return XGetDefault(GDK_DISPLAY(), app_name, key);
}
/*
* Default settings that are specific to pterm.
*/
char *platform_default_s(char *name)
{
if (!strcmp(name, "Font"))
return "fixed"; /* COE_NORMAL works badly in an xterm */
return NULL;
}
int platform_default_i(char *name, int def)
{
if (!strcmp(name, "CloseOnExit"))
return COE_ALWAYS; /* COE_NORMAL works badly in an xterm */
return def;
}
void ldisc_update(void *frontend, int echo, int edit)
{
/*