1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-30 06:45:25 +00:00

color forcing stuff left from previous commit

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1927 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-10-28 18:51:00 +00:00 committed by cras
parent fb439b5c2a
commit 83324a0ed5

View File

@ -92,9 +92,14 @@ static void read_settings(void)
{
int old_colors = term_use_colors;
if (settings_get_bool("force_colors"))
term_use_colors = TRUE;
else {
if (settings_get_bool("force_colors")) {
if (!term_use_colors) {
term_force_colors(TRUE);
term_use_colors = TRUE;
}
} else {
if (!term_has_colors() && term_use_colors)
term_force_colors(FALSE);
term_use_colors = settings_get_bool("colors");
if (term_use_colors && !term_has_colors())
term_use_colors = FALSE;
@ -111,7 +116,9 @@ void term_common_init(void)
#endif
settings_add_bool("lookandfeel", "colors", TRUE);
settings_add_bool("lookandfeel", "force_colors", FALSE);
term_use_colors = settings_get_bool("colors");
term_use_colors = term_has_colors() && settings_get_bool("colors");
read_settings();
signal_add("beep", (SIGNAL_FUNC) term_beep);
signal_add("setup changed", (SIGNAL_FUNC) read_settings);