summary refs log tree commit diff stats
path: root/src/fe-gtk/plugin-tray.c
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2013-04-13 23:03:54 -0400
committerTingPing <tingping@tingping.se>2013-04-13 23:03:54 -0400
commite67371d269eab88bb684a7c5d5e37190cdf805dd (patch)
tree2d6bdb0f31a8d74a5d6bbeebfb1d2009a4aaec6f /src/fe-gtk/plugin-tray.c
parenta99654957759e39c3272c1b4fa7c0deb5d85c4e6 (diff)
Add option for omitting alerts while focused
Diffstat (limited to 'src/fe-gtk/plugin-tray.c')
-rw-r--r--src/fe-gtk/plugin-tray.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c
index 7ea975da..365e6117 100644
--- a/src/fe-gtk/plugin-tray.c
+++ b/src/fe-gtk/plugin-tray.c
@@ -167,7 +167,8 @@ fe_tray_set_balloon (const char *title, const char *text)
 
 	/* no balloons if the window is focused */
 	ws = tray_get_window_status ();
-	if (ws == WS_FOCUSED)
+	if ((prefs.hex_away_omit_alerts && hexchat_get_info(ph, "away")) ||
+		(prefs.hex_gui_focus_omitalerts && ws == WS_FOCUSED))
 		return;
 
 	/* bit 1 of flags means "no balloons unless hidden/iconified" */
@@ -693,9 +694,6 @@ tray_hilight_cb (char *word[], void *userdata)
 	/*if (tray_status == TS_HIGHLIGHT)
 		return HEXCHAT_EAT_NONE;*/
 
-	if (prefs.hex_away_omit_alerts && hexchat_get_info(ph, "away"))
-		return HEXCHAT_EAT_NONE;
-
 	if (prefs.hex_input_tray_hilight)
 	{
 		tray_set_flash (ICON_HILIGHT);
@@ -723,9 +721,6 @@ tray_message_cb (char *word[], void *userdata)
 	if (/*tray_status == TS_MESSAGE ||*/ tray_status == TS_HIGHLIGHT)
 		return HEXCHAT_EAT_NONE;
 		
-	if (prefs.hex_away_omit_alerts && hexchat_get_info(ph, "away"))
-		return HEXCHAT_EAT_NONE;
-		
 	if (prefs.hex_input_tray_chans)
 	{
 		tray_set_flash (ICON_MSG);
@@ -778,7 +773,7 @@ tray_priv_cb (char *word[], void *userdata)
 	/*if (tray_status == TS_HIGHLIGHT)
 		return HEXCHAT_EAT_NONE;*/
 
-	if (prefs.hex_input_tray_priv && (!prefs.hex_away_omit_alerts || !hexchat_get_info(ph, "away")))
+	if (prefs.hex_input_tray_priv)
 		tray_priv (word[1], word[2]);
 
 	return HEXCHAT_EAT_NONE;