summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-05-12 00:51:07 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-05-12 00:51:07 +0000
commited1eb46eb45bdad3f60cf16351d283f8923d2a3a (patch)
tree18ded0c276620ee36786eaec65e097099911b193
parenta26be5e37daa08584c4bcb477e8624d51f39dc8c (diff)
downloadirssi-ed1eb46eb45bdad3f60cf16351d283f8923d2a3a.zip
/set hide_mirc_colors -> /set hide_colors, which also hides ANSI colors.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2776 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/fe-common/core/fe-common-core.c2
-rw-r--r--src/fe-common/core/formats.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c
index f356aa28..94e18fc1 100644
--- a/src/fe-common/core/fe-common-core.c
+++ b/src/fe-common/core/fe-common-core.c
@@ -161,7 +161,7 @@ void fe_common_core_init(void)
settings_add_bool("lookandfeel", "beep_when_away", TRUE);
settings_add_bool("lookandfeel", "hide_text_style", FALSE);
- settings_add_bool("lookandfeel", "hide_mirc_colors", FALSE);
+ settings_add_bool("lookandfeel", "hide_colors", FALSE);
settings_add_bool("lookandfeel", "hide_server_tags", FALSE);
settings_add_bool("lookandfeel", "use_status_window", TRUE);
diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c
index 1e3eadb0..983a849e 100644
--- a/src/fe-common/core/formats.c
+++ b/src/fe-common/core/formats.c
@@ -38,7 +38,7 @@ static const char *format_fores = "kbgcrmyw";
static const char *format_boldfores = "KBGCRMYW";
static int signal_gui_print_text;
-static int hide_text_style, hide_server_tags, hide_mirc_colors;
+static int hide_text_style, hide_server_tags, hide_colors;
static int timestamp_level;
static int timestamp_timeout;
@@ -978,9 +978,9 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text)
case 3:
/* MIRC color */
get_mirc_color((const char **) &ptr,
- hide_mirc_colors || hide_text_style ? NULL : &fgcolor,
- hide_mirc_colors || hide_text_style ? NULL : &bgcolor);
- if (!hide_mirc_colors && !hide_text_style)
+ hide_colors ? NULL : &fgcolor,
+ hide_colors ? NULL : &bgcolor);
+ if (!hide_colors)
flags |= GUI_PRINT_FLAG_MIRC_COLOR;
break;
case 4:
@@ -1077,9 +1077,9 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text)
/* ansi color code */
ptr = (char *)
get_ansi_color(theme, ptr,
- hide_text_style ? NULL : &fgcolor,
- hide_text_style ? NULL : &bgcolor,
- hide_text_style ? NULL : &flags);
+ hide_colors ? NULL : &fgcolor,
+ hide_colors ? NULL : &bgcolor,
+ hide_colors ? NULL : &flags);
break;
}
@@ -1100,7 +1100,7 @@ static void read_settings(void)
hide_server_tags = settings_get_bool("hide_server_tags");
hide_text_style = settings_get_bool("hide_text_style");
- hide_mirc_colors = settings_get_bool("hide_mirc_colors");
+ hide_colors = hide_text_style || settings_get_bool("hide_colors");
}
void formats_init(void)