diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/fe.h | 11 | ||||
-rw-r--r-- | src/common/outbound.c | 12 |
2 files changed, 19 insertions, 4 deletions
diff --git a/src/common/fe.h b/src/common/fe.h index 6614055b..9da4e230 100644 --- a/src/common/fe.h +++ b/src/common/fe.h @@ -69,7 +69,16 @@ int fe_input_add (int sok, int flags, void *func, void *data); void fe_input_remove (int tag); void fe_idle_add (void *func, void *data); void fe_set_topic (struct session *sess, char *topic, char *stripped_topic); -void fe_set_tab_color (struct session *sess, int col); +typedef enum +{ + FE_COLOR_NONE = 0, + FE_COLOR_NEW_DATA = 1, + FE_COLOR_NEW_MSG = 2, + FE_COLOR_NEW_HILIGHT = 3, + FE_COLOR_FLAG_NOOVERRIDE = 8, +} tabcolor; +#define FE_COLOR_ALLFLAGS (FE_COLOR_FLAG_NOOVERRIDE) +void fe_set_tab_color (struct session *sess, tabcolor col); void fe_flash_window (struct session *sess); void fe_update_mode_buttons (struct session *sess, char mode, char sign); void fe_update_channel_key (struct session *sess); diff --git a/src/common/outbound.c b/src/common/outbound.c index 70fcd436..fcc731e2 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -2152,7 +2152,6 @@ cmd_gui (struct session *sess, char *tbuf, char *word[], char *word_eol[]) { case 0x058b836e: fe_ctrl_gui (sess, 8, 0); break; /* APPLY */ case 0xac1eee45: fe_ctrl_gui (sess, 7, 2); break; /* ATTACH */ - case 0x05a72f63: fe_ctrl_gui (sess, 4, atoi (word[3])); break; /* COLOR */ case 0xb06a1793: fe_ctrl_gui (sess, 7, 1); break; /* DETACH */ case 0x05cfeff0: fe_ctrl_gui (sess, 3, 0); break; /* FLASH */ case 0x05d154d8: fe_ctrl_gui (sess, 2, 0); break; /* FOCUS */ @@ -2166,6 +2165,12 @@ cmd_gui (struct session *sess, char *tbuf, char *word[], char *word_eol[]) else return FALSE; break; + case 0x05a72f63: /* COLOR */ + if (!g_ascii_strcasecmp (word[4], "-NOOVERRIDE")) + fe_ctrl_gui (sess, 4, FE_COLOR_FLAG_NOOVERRIDE | atoi (word[3])); + else + fe_ctrl_gui (sess, 4, atoi (word[3])); + break; default: return FALSE; } @@ -4015,8 +4020,9 @@ const struct commands xc_cmds[] = { {"GETINT", cmd_getint, 0, 0, 1, "GETINT <default> <command> <prompt>"}, {"GETSTR", cmd_getstr, 0, 0, 1, "GETSTR <default> <command> <prompt>"}, {"GHOST", cmd_ghost, 1, 0, 1, N_("GHOST <nick> [password], Kills a ghosted nickname")}, - {"GUI", cmd_gui, 0, 0, 1, "GUI [APPLY|ATTACH|DETACH|SHOW|HIDE|FOCUS|FLASH|ICONIFY|COLOR <n>]\n" - " GUI [MSGBOX <text>|MENU TOGGLE]"}, + {"GUI", cmd_gui, 0, 0, 1, "GUI [APPLY|ATTACH|DETACH|SHOW|HIDE|FOCUS|FLASH|ICONIFY]\n" + " GUI [MSGBOX <text>|MENU TOGGLE]\n" + " GUI COLOR <n> [-NOOVERRIDE]"}, {"HELP", cmd_help, 0, 0, 1, 0}, {"HOP", cmd_hop, 1, 1, 1, N_("HOP <nick>, gives chanhalf-op status to the nick (needs chanop)")}, |