1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/unix
Simon Tatham ca9cd983e1 Centralise palette setup into terminal.c.
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().
2021-02-07 19:59:21 +00:00
..
configure Move the Unix configure script up to the top level. 2014-02-22 18:01:32 +00:00
gtkapp.c Move all extern declarations into header files. 2018-11-03 13:47:29 +00:00
gtkask.c Refactor 'struct context *ctx = &actx' pattern. 2019-12-24 13:47:46 +00:00
gtkcfg.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
gtkcols.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
gtkcols.h Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
gtkcomm.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
gtkcompat.h gtkcompat.h: fix GTK1 implementation of ref_sink. 2019-11-02 08:26:14 +00:00
gtkdlg.c Formatting change to braces around one case of a switch. 2020-02-16 11:26:21 +00:00
gtkfont.c Support SGR 9 for strikethrough effect on text. 2020-08-13 21:08:53 +01:00
gtkfont.h Support SGR 9 for strikethrough effect on text. 2020-08-13 21:08:53 +01:00
gtkmain.c GTK: fix control flow in do_cmdline(). 2020-06-21 16:39:47 +01:00
gtkmisc.c Convert a lot of 'int' variables to 'bool'. 2018-11-03 13:45:00 +00:00
gtkmisc.h Convert a lot of 'int' variables to 'bool'. 2018-11-03 13:45:00 +00:00
gtkwin.c Centralise palette setup into terminal.c. 2021-02-07 19:59:21 +00:00
osxlaunch.c osxlaunch: stop setting DYLD_LIBRARY_PATH. 2017-12-20 10:04:02 +00:00
procnet.c Add a /proc/net magic authenticator. 2019-03-31 10:35:10 +01:00
pterm.bundle OS X makefile: stop depending on JHBUILD_PREFIX. 2017-11-26 11:45:48 +00:00
pterm.plist Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
putty.bundle OS X makefile: stop depending on JHBUILD_PREFIX. 2017-11-26 11:45:48 +00:00
putty.plist Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
unix.h Move all window-title management into Terminal. 2021-02-07 19:59:20 +00:00
ux_x11.c Make dupcat() into a variadic macro. 2019-10-14 19:42:37 +01:00
uxagentc.c Merge the two low-level portfwd setup systems. 2020-01-27 19:40:50 +00:00
uxagentsock.c Fix a few 'triple letter in place of double' typos. 2021-01-17 09:18:42 +00:00
uxcfg.c Rework per-backend GUI configuration. 2020-03-10 21:27:57 +00:00
uxcliloop.c Factor out common code from Unix CLI main loops. 2020-02-07 19:14:32 +00:00
uxcons.c Introduce and use strbuf_chomp. 2020-02-09 08:51:37 +00:00
uxfdsock.c Fix typo in a top-of-file comment. 2020-03-10 21:11:14 +00:00
uxgen.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
uxgss.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
uxmisc.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
uxnet.c Change vtable defs to use C99 designated initialisers. 2020-03-10 21:06:29 +00:00
uxnogtk.c Include the compile-time GTK version in the build info. 2017-02-15 19:32:42 +00:00
uxnoise.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
uxpeer.c Convert a lot of 'int' variables to 'bool'. 2018-11-03 13:45:00 +00:00
uxpgnt.c pageant -l: indicate whether keys are encrypted. 2020-12-15 16:01:15 +00:00
uxplink.c Unix Plink: fix tight loop after EOF on stdin. 2021-02-02 18:22:41 +00:00
uxpoll.c pollwrap: stop returning unasked-for rwx statuses. 2020-06-14 15:49:36 +01:00
uxprint.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
uxproxy.c Make the plug_log type code into an enum. 2020-02-07 19:17:45 +00:00
uxpsusan.c psusan: write a man page. 2020-12-13 12:36:38 +00:00
uxpterm.c Move all window-title management into Terminal. 2021-02-07 19:59:20 +00:00
uxpty.c Merge the 0.74 release branch back to master. 2020-06-27 08:11:22 +01:00
uxputty.c Move all window-title management into Terminal. 2021-02-07 19:59:20 +00:00
uxsel.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
uxser.c uxser: add a missing uxsel_del. 2020-06-14 15:49:36 +01:00
uxserver.c Uppity: add stunt for unauthorised agent forwarding attempts. 2020-12-23 22:26:44 +00:00
uxsftp.c Fix assorted minor memory leaks. 2020-06-21 16:39:47 +01:00
uxsftpserver.c psusan: fix assertion failure in SFTP server. 2020-11-04 21:50:47 +00:00
uxshare.c Make dupcat() into a variadic macro. 2019-10-14 19:42:37 +01:00
uxsignal.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
uxsocks.c Auxiliary application: 'psocks', a simple SOCKS server. 2020-02-23 16:36:27 +00:00
uxstore.c New functions to shrink a strbuf. 2020-02-09 08:51:37 +00:00
uxucs.c uxucs.c: fix type of wcrtomb return value. 2020-06-14 15:49:36 +01:00
uxutils.c Hardware-accelerated SHA-512 on the Arm architecture. 2020-12-24 15:39:54 +00:00
uxutils.h Include <sys/sysctl.h> for Intel builds 2020-12-25 06:57:35 +00:00
x11misc.c Add lots of missing 'static' keywords. 2020-01-29 06:44:18 +00:00
x11misc.h Basic support for running under GDK Wayland back end. 2018-05-09 09:21:27 +01:00
xkeysym.c Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
xpmptcfg.c Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
xpmpterm.c Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
xpmpucfg.c Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00
xpmputty.c Tweak the icon script, and the generated icons, to more closely 2007-01-07 10:17:12 +00:00