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:
17
unix/pterm.c
17
unix/pterm.c
@ -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)
|
||||
{
|
||||
/*
|
||||
|
Reference in New Issue
Block a user