summary refs log tree commit diff stats
path: root/src/common/hexchat.h
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2016-11-11 19:25:46 -0500
committerPatrick Griffis <tingping@tingping.se>2016-11-11 19:27:57 -0500
commit241dd69b081779a77718763561a779cdffcaf11f (patch)
treec9ee1ac451506f8b17efbf1b5b98cd97fe19aee5 /src/common/hexchat.h
parent539949973c484f14d40f1886d67ec09df057315c (diff)
Further tab color improvements
- Combine the three properties into a single one
- Finally fully fix the handling with plugins handling events

TODO: Look into lastact handling of these, seems wrong
Diffstat (limited to 'src/common/hexchat.h')
-rw-r--r--src/common/hexchat.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/common/hexchat.h b/src/common/hexchat.h
index 2bdfb656..38a3e830 100644
--- a/src/common/hexchat.h
+++ b/src/common/hexchat.h
@@ -352,6 +352,13 @@ typedef enum gtk_xtext_search_flags_e {
 	regexp = 16
 } gtk_xtext_search_flags;
 
+typedef enum {
+	TAB_STATE_NONE = 0,
+	TAB_STATE_NEW_DATA = (1 << 0),
+	TAB_STATE_NEW_MSG = (1 << 1),
+	TAB_STATE_NEW_HILIGHT = (1 << 2),
+} tab_state_flags;
+
 typedef struct session
 {
 	/* Per-Channel Alerts */
@@ -406,16 +413,14 @@ typedef struct session
 	int lastact_idx;		/* the sess_list_by_lastact[] index of the list we're in.
 							 * For valid values, see defines of LACT_*. */
 
-	int new_data:1;			/* new data avail? (purple tab) */
-	int nick_said:1;		/* your nick mentioned? (blue tab) */
-	int msg_said:1;			/* new msg available? (red tab) */
-
 	int ignore_date:1;
 	int ignore_mode:1;
 	int ignore_names:1;
 	int end_of_names:1;
 	int doing_who:1;		/* /who sent on this channel */
 	int done_away_check:1;	/* done checking for away status changes */
+	tab_state_flags tab_state;
+	tab_state_flags last_tab_state; /* before event is handled */
 	gtk_xtext_search_flags lastlog_flags;
 	void (*scrollback_replay_marklast) (struct session *sess);
 } session;