mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 16:00:18 +00:00
More fixes for tab color handling with plugins
Part 2 of 03767ee0f9
So how the colors work should be pretty straight forward:
- A message comes in and is handled, this sets the state flags:
nick_said, msg_said, new_data. These map to tab colors.
- This state is reset under one of these conditions:
- It is commited to the UI when actually printed on unfocused tab
- Event is interupted by a plugin hook
- The tab focus is changed
This commit is contained in:
@@ -660,21 +660,21 @@ fe_print_text (struct session *sess, char *text, time_t stamp,
|
||||
{
|
||||
PrintTextRaw (sess->res->buffer, (unsigned char *)text, prefs.hex_text_indent, stamp);
|
||||
|
||||
if (no_activity || sess == current_tab || !sess->gui->is_tab)
|
||||
if (no_activity || !sess->gui->is_tab)
|
||||
return;
|
||||
|
||||
if (sess->nick_said)
|
||||
if (sess == current_tab)
|
||||
{
|
||||
sess->nick_said = FALSE;
|
||||
sess->msg_said = FALSE;
|
||||
sess->new_data = FALSE;
|
||||
}
|
||||
else if (sess->nick_said)
|
||||
fe_set_tab_color (sess, 3);
|
||||
else if (sess->msg_said)
|
||||
fe_set_tab_color (sess, 2);
|
||||
else
|
||||
fe_set_tab_color (sess, 1);
|
||||
|
||||
if (!sess->new_data && !sess->nick_said)
|
||||
{
|
||||
sess->new_data = TRUE;
|
||||
lastact_update (sess);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user