1
1

* 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.
Этот коммит содержится в:
Pavel Roskin 2002-11-28 18:57:05 +00:00
родитель 759125c6c7
Коммит 8ba045461d
2 изменённых файлов: 12 добавлений и 5 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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)