mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
ca9cd983e1
Now terminal.c makes nearly all the decisions about what the colour palette should actually contain: it does the job of reading the GUI-configurable colours out of Conf, and also the job of making up the rest of the xterm-256 palette. The only exception is that TermWin can provide a method to override some of the default colours, which on Windows is used to implement the 'Use system colours' config option. This saves code overall, partly because the front ends don't have to be able to send palette data back to the Terminal any more (the Terminal keeps the master copy and can answer palette-query escape sequences from its own knowledge), and also because now there's only one copy of the xterm-256 palette setup code (previously gtkwin.c and window.c each had their own version of it). In this rewrite, I've also introduced a multi-layered storage system for the palette data in Terminal. One layer contains the palette information derived from Conf; the next contains platform overrides (currently just Windows's 'Use system colours'); the last one contains overrides set by escape sequences in the middle of the session. The topmost two layers can each _conditionally_ override the ones below. As a result, if a server-side application manually resets (say) the default fg and bg colours in mid-session to something that works well in a particular application, those changes won't be wiped out by a change in the Windows system colours or the Conf, which they would have been before. Instead, changes in Conf or the system colours alter the lower layers of the structure, but then when palette_rebuild is called, the upper layer continues to override them, until a palette reset (ESC]R) or terminal reset (e.g. ESC c) removes those upper-layer changes. This seems like a more consistent strategy, in that the same set of configuration settings will produce the same end result regardless of what order they were applied in. The palette-related methods in TermWin have had a total rework. palette_get and palette_reset are both gone; palette_set can now set a contiguous range of colours in one go; and the new palette_get_overrides replaces window.c's old systopalette(). |
||
---|---|---|
.. | ||
configure | ||
gtkapp.c | ||
gtkask.c | ||
gtkcfg.c | ||
gtkcols.c | ||
gtkcols.h | ||
gtkcomm.c | ||
gtkcompat.h | ||
gtkdlg.c | ||
gtkfont.c | ||
gtkfont.h | ||
gtkmain.c | ||
gtkmisc.c | ||
gtkmisc.h | ||
gtkwin.c | ||
osxlaunch.c | ||
procnet.c | ||
pterm.bundle | ||
pterm.plist | ||
putty.bundle | ||
putty.plist | ||
unix.h | ||
ux_x11.c | ||
uxagentc.c | ||
uxagentsock.c | ||
uxcfg.c | ||
uxcliloop.c | ||
uxcons.c | ||
uxfdsock.c | ||
uxgen.c | ||
uxgss.c | ||
uxmisc.c | ||
uxnet.c | ||
uxnogtk.c | ||
uxnoise.c | ||
uxpeer.c | ||
uxpgnt.c | ||
uxplink.c | ||
uxpoll.c | ||
uxprint.c | ||
uxproxy.c | ||
uxpsusan.c | ||
uxpterm.c | ||
uxpty.c | ||
uxputty.c | ||
uxsel.c | ||
uxser.c | ||
uxserver.c | ||
uxsftp.c | ||
uxsftpserver.c | ||
uxshare.c | ||
uxsignal.c | ||
uxsocks.c | ||
uxstore.c | ||
uxucs.c | ||
uxutils.c | ||
uxutils.h | ||
x11misc.c | ||
x11misc.h | ||
xkeysym.c | ||
xpmptcfg.c | ||
xpmpterm.c | ||
xpmpucfg.c | ||
xpmputty.c |