summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2012-12-20 19:39:52 -0500
committerTingPing <tingping@tingping.se>2012-12-20 19:39:52 -0500
commit4524367cc037f6b3e173de96ea9b57afc2a0da5a (patch)
treec3a8edbfacc12026deb288c4a4d4256e773c6d22 /src/fe-gtk
parent76680ae41b34f15df59817dea1d163548b9a2d58 (diff)
Add auto-away to plugin-tray
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/plugin-tray.c4
-rw-r--r--src/fe-gtk/setup.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c
index 07207a99..1db0f630 100644
--- a/src/fe-gtk/plugin-tray.c
+++ b/src/fe-gtk/plugin-tray.c
@@ -394,12 +394,16 @@ tray_toggle_visibility (gboolean force_hide)
 	if (force_hide || GTK_WIDGET_VISIBLE (win))
 #endif
 	{
+		if (prefs.hex_gui_tray_away)
+			hexchat_command (ph, "ALLSERV AWAY");
 		gtk_window_get_position (win, &x, &y);
 		screen = gtk_window_get_screen (win);
 		gtk_widget_hide (GTK_WIDGET (win));
 	}
 	else
 	{
+		if (prefs.hex_gui_tray_away)
+			hexchat_command (ph, "ALLSERV BACK");
 		gtk_window_set_screen (win, screen);
 		gtk_window_move (win, x, y);
 		gtk_widget_show (GTK_WIDGET (win));
diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c
index df31376d..87a943a5 100644
--- a/src/fe-gtk/setup.c
+++ b/src/fe-gtk/setup.c
@@ -435,6 +435,7 @@ static const setting alert_settings[] =
 	{ST_TOGGLE,	N_("Enable system tray icon"), P_OFFINTNL(hex_gui_tray), 0, 0, 0},
 	{ST_TOGGLE,	N_("Minimize to tray"), P_OFFINTNL(hex_gui_tray_minimize), 0, 0, 0},
 	{ST_TOGGLE,	N_("Close to tray"), P_OFFINTNL(hex_gui_tray_close), 0, 0, 0},
+	{ST_TOGGLE,	N_("Automatically mark away/back"), P_OFFINTNL(hex_gui_tray_away), N_("When hiding to tray automatically change status."), 0, 0},
 #ifndef WIN32
 	{ST_TOGGLE,	N_("Only show tray balloons when hidden or iconified"), P_OFFINTNL(hex_gui_tray_quiet), 0, 0, 0},
 #endif