* color.c (mc_init_pair) [HAVE_SLANG]: Pass "default", not NULL
to SLtt_set_color() - it fixes transparency with the latest versions of S-Lang. Treat foreground like background.
Этот коммит содержится в:
родитель
759125c6c7
Коммит
8ba045461d
@ -1,3 +1,9 @@
|
|||||||
|
2002-11-28 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* color.c (mc_init_pair) [HAVE_SLANG]: Pass "default", not NULL
|
||||||
|
to SLtt_set_color() - it fixes transparency with the latest
|
||||||
|
versions of S-Lang. Treat foreground like background.
|
||||||
|
|
||||||
2002-11-20 Pavel Roskin <proski@gnu.org>
|
2002-11-20 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
* main.c: Eliminate finish_program variable - mc can now exit
|
* main.c: Eliminate finish_program variable - mc can now exit
|
||||||
|
11
src/color.c
11
src/color.c
@ -121,7 +121,7 @@ static struct color_table_s const color_table [] = {
|
|||||||
{ "brightcyan", COLOR_CYAN | A_BOLD },
|
{ "brightcyan", COLOR_CYAN | A_BOLD },
|
||||||
{ "lightgray", COLOR_WHITE },
|
{ "lightgray", COLOR_WHITE },
|
||||||
{ "white", COLOR_WHITE | A_BOLD },
|
{ "white", COLOR_WHITE | A_BOLD },
|
||||||
{ "default", 0 } /* hack for transparent background */
|
{ "default", 0 } /* default color of the terminal */
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_SLANG
|
#ifdef HAVE_SLANG
|
||||||
@ -321,10 +321,11 @@ static struct colors_avail {
|
|||||||
void
|
void
|
||||||
mc_init_pair (int index, CTYPE foreground, CTYPE background)
|
mc_init_pair (int index, CTYPE foreground, CTYPE background)
|
||||||
{
|
{
|
||||||
/* hack for transparent background for Eterm, rxvt or else */
|
if (!background)
|
||||||
if (background && !strcmp (background, "default"))
|
background = "default";
|
||||||
background = NULL;
|
|
||||||
/* if foreground is default, I guess we should use normal fore-color. */
|
if (!foreground)
|
||||||
|
foreground = "default";
|
||||||
|
|
||||||
SLtt_set_color (index, "", foreground, background);
|
SLtt_set_color (index, "", foreground, background);
|
||||||
if (index > max_index)
|
if (index > max_index)
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user