1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00

DJSD requests a force-monochrome option for users who dislike angry-

fruit-salad applications :-)

[originally from svn r4762]
This commit is contained in:
Simon Tatham 2004-11-09 17:57:32 +00:00
parent 0c4acb8c17
commit 814408f2d3
6 changed files with 24 additions and 1 deletions

View File

@ -1233,6 +1233,9 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
s = ctrl_getset(b, "Window/Colours", "general",
"General options for colour usage");
ctrl_checkbox(s, "Allow terminal to specify ANSI colours", 'i',
HELPCTX(colours_ansi),
dlg_stdcheckbox_handler, I(offsetof(Config,ansi_colour)));
ctrl_checkbox(s, "Bolded text is a different colour", 'b',
HELPCTX(colours_bold),
dlg_stdcheckbox_handler, I(offsetof(Config,bold_colour)));

View File

@ -1,4 +1,4 @@
\versionid $Id: config.but,v 1.96 2004/10/24 18:26:00 jacob Exp $
\versionid $Id: config.but,v 1.97 2004/11/09 17:57:32 simon Exp $
\C{config} Configuring PuTTY
@ -1389,6 +1389,18 @@ immediately.
The Colours panel allows you to control PuTTY's use of colour.
\S{config-ansicolour} \q{Allow terminal to specify ANSI colours}
\cfg{winhelp-topic}{colours.ansi}
This option is enabled by default. If it is disabled, PuTTY will
ignore any control sequences sent by the server to request coloured
text.
If you have a particularly garish application, you might want to
turn this option off and make PuTTY only use the default foreground
and background colours.
\S{config-boldcolour} \q{Bolded text is a different colour}
\cfg{winhelp-topic}{colours.bold}

View File

@ -444,6 +444,7 @@ struct config_tag {
int arabicshaping;
int bidi;
/* Colour options */
int ansi_colour;
int system_colour;
int try_palette;
int bold_colour;

View File

@ -288,6 +288,7 @@ void save_open_settings(void *sesskey, int do_host, Config *cfg)
write_setting_i(sesskey, "FontVTMode", cfg->vtmode);
write_setting_i(sesskey, "UseSystemColours", cfg->system_colour);
write_setting_i(sesskey, "TryPalette", cfg->try_palette);
write_setting_i(sesskey, "ANSIColour", cfg->ansi_colour);
write_setting_i(sesskey, "BoldAsColour", cfg->bold_colour);
for (i = 0; i < 22; i++) {
@ -553,6 +554,7 @@ void load_open_settings(void *sesskey, int do_host, Config *cfg)
gppi(sesskey, "FontVTMode", VT_UNICODE, (int *) &cfg->vtmode);
gppi(sesskey, "UseSystemColours", 0, &cfg->system_colour);
gppi(sesskey, "TryPalette", 0, &cfg->try_palette);
gppi(sesskey, "ANSIColour", 1, &cfg->ansi_colour);
gppi(sesskey, "BoldAsColour", 1, &cfg->bold_colour);
for (i = 0; i < 22; i++) {

View File

@ -4447,6 +4447,10 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise)
tchar = d->chr;
tattr = d->attr;
if (!term->cfg.ansi_colour)
tattr = (tattr & ~(ATTR_FGMASK | ATTR_BGMASK)) |
ATTR_DEFFG | ATTR_DEFBG;
switch (tchar & CSET_MASK) {
case CSET_ASCII:
tchar = term->ucsdata->unitab_line[tchar & 0xFF];

View File

@ -96,6 +96,7 @@
#define WINHELP_CTX_selection_charclasses "selection.charclasses"
#define WINHELP_CTX_selection_linedraw "selection.linedraw"
#define WINHELP_CTX_selection_rtf "selection.rtf"
#define WINHELP_CTX_colours_ansi "colours.ansi"
#define WINHELP_CTX_colours_bold "colours.bold"
#define WINHELP_CTX_colours_system "colours.system"
#define WINHELP_CTX_colours_logpal "colours.logpal"