NetworkManager/clients
Thomas Haller 94ecdc0cb9 cli: rework check-colors to first evaluate enabled/disabled
With --color=auto, coloring is enabled based on the .enable/.disable
termcolors files.

Likewise, when we enable coloring, we parse the color palette from the
.schem termcolors files.

The termcolors files are searched by finding the best match depending
on the terminal and application name. Note, that if we find a matching
file like "nmcli@xterm.enable" we still allow loading the palette from
a less specific file like "nmcli.schem" and vice versa. That was already
done before.

Previously, the search was done by calling several layers of functions, and having
in/out arguments "color_option" and "p_palette_buffer". in/out paramters
here seems confusing to me, as they are state that gets modified and carried
along.

Instead, rework the functions to clearly separate between input
and output arguments.

Also, in the auto-case, check_colors() now first determines whether
coloring is enabled, before even starting loading the palette.
This avoids loading the palette until we are sure that we need it.
2018-06-26 11:32:39 +02:00
..
cli cli: rework check-colors to first evaluate enabled/disabled 2018-06-26 11:32:39 +02:00
common clients: fix using hints for 802-1x secret request 2018-06-24 14:15:42 +02:00
tests clients/tests: add more tests showing nmcli output 2018-06-21 13:43:16 +02:00
tui build: unifiy specifying locale directory define 2018-05-31 15:59:38 +02:00
meson.build build/meson: use variables for ldflags and linker-script 2018-01-11 12:46:01 +01:00
nm-online.c all: require glib 2.40 2018-01-18 11:45:36 +01:00