1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 03:03:12 +02:00

Fix bug with text attribute in IRC messages: toggle attribute instead of always forcing it to on (bug #25770)

This commit is contained in:
Sebastien Helleu
2009-03-07 00:18:19 +01:00
parent 780a7478ee
commit 997434ef8b
3 changed files with 55 additions and 8 deletions
+28
View File
@@ -104,6 +104,13 @@ gui_color_get_custom (const char *color_name)
GUI_COLOR_SET_WEECHAT_STR,
GUI_COLOR_ATTR_BOLD_STR);
}
else if (string_strcasecmp (color_name, "-bold") == 0)
{
snprintf (color[index_color], sizeof (color[index_color]),
"%s%s",
GUI_COLOR_REMOVE_WEECHAT_STR,
GUI_COLOR_ATTR_BOLD_STR);
}
else if (string_strcasecmp (color_name, "reverse") == 0)
{
snprintf (color[index_color], sizeof (color[index_color]),
@@ -111,6 +118,13 @@ gui_color_get_custom (const char *color_name)
GUI_COLOR_SET_WEECHAT_STR,
GUI_COLOR_ATTR_REVERSE_STR);
}
else if (string_strcasecmp (color_name, "-reverse") == 0)
{
snprintf (color[index_color], sizeof (color[index_color]),
"%s%s",
GUI_COLOR_REMOVE_WEECHAT_STR,
GUI_COLOR_ATTR_REVERSE_STR);
}
else if (string_strcasecmp (color_name, "italic") == 0)
{
snprintf (color[index_color], sizeof (color[index_color]),
@@ -118,6 +132,13 @@ gui_color_get_custom (const char *color_name)
GUI_COLOR_SET_WEECHAT_STR,
GUI_COLOR_ATTR_ITALIC_STR);
}
else if (string_strcasecmp (color_name, "-italic") == 0)
{
snprintf (color[index_color], sizeof (color[index_color]),
"%s%s",
GUI_COLOR_REMOVE_WEECHAT_STR,
GUI_COLOR_ATTR_ITALIC_STR);
}
else if (string_strcasecmp (color_name, "underline") == 0)
{
snprintf (color[index_color], sizeof (color[index_color]),
@@ -125,6 +146,13 @@ gui_color_get_custom (const char *color_name)
GUI_COLOR_SET_WEECHAT_STR,
GUI_COLOR_ATTR_UNDERLINE_STR);
}
else if (string_strcasecmp (color_name, "-underline") == 0)
{
snprintf (color[index_color], sizeof (color[index_color]),
"%s%s",
GUI_COLOR_REMOVE_WEECHAT_STR,
GUI_COLOR_ATTR_UNDERLINE_STR);
}
else if (string_strcasecmp (color_name, "bar_fg") == 0)
{
snprintf (color[index_color], sizeof (color[index_color]),