From 83324a0ed56366e0897b81625d36ddd5be5a6261 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 28 Oct 2001 18:51:00 +0000 Subject: color forcing stuff left from previous commit git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1927 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/term.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/fe-text') diff --git a/src/fe-text/term.c b/src/fe-text/term.c index 97764ac1..a20f7b50 100644 --- a/src/fe-text/term.c +++ b/src/fe-text/term.c @@ -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); -- cgit v1.2.3