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)));
-\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
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}
int arabicshaping;
int bidi;
/* Colour options */
+ int ansi_colour;
int system_colour;
int try_palette;
int bold_colour;
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++) {
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++) {
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];
#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"