mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-29 20:52:16 -05:00
Add auto-away to plugin-tray
This commit is contained in:
parent
76680ae41b
commit
4524367cc0
@ -460,6 +460,7 @@ const struct prefs vars[] =
|
|||||||
{"gui_throttlemeter", P_OFFINT (hex_gui_throttlemeter), TYPE_INT},
|
{"gui_throttlemeter", P_OFFINT (hex_gui_throttlemeter), TYPE_INT},
|
||||||
{"gui_topicbar", P_OFFINT (hex_gui_topicbar), TYPE_BOOL},
|
{"gui_topicbar", P_OFFINT (hex_gui_topicbar), TYPE_BOOL},
|
||||||
{"gui_tray", P_OFFINT (hex_gui_tray), TYPE_BOOL},
|
{"gui_tray", P_OFFINT (hex_gui_tray), TYPE_BOOL},
|
||||||
|
{"gui_tray_away", P_OFFINT (hex_gui_tray_away), TYPE_BOOL},
|
||||||
{"gui_tray_close", P_OFFINT (hex_gui_tray_close), TYPE_BOOL},
|
{"gui_tray_close", P_OFFINT (hex_gui_tray_close), TYPE_BOOL},
|
||||||
{"gui_tray_minimize", P_OFFINT (hex_gui_tray_minimize), TYPE_BOOL},
|
{"gui_tray_minimize", P_OFFINT (hex_gui_tray_minimize), TYPE_BOOL},
|
||||||
{"gui_tray_quiet", P_OFFINT (hex_gui_tray_quiet), TYPE_BOOL},
|
{"gui_tray_quiet", P_OFFINT (hex_gui_tray_quiet), TYPE_BOOL},
|
||||||
|
@ -152,6 +152,7 @@ struct hexchatprefs
|
|||||||
unsigned int hex_gui_tab_utils;
|
unsigned int hex_gui_tab_utils;
|
||||||
unsigned int hex_gui_topicbar;
|
unsigned int hex_gui_topicbar;
|
||||||
unsigned int hex_gui_tray;
|
unsigned int hex_gui_tray;
|
||||||
|
unsigned int hex_gui_tray_away;
|
||||||
unsigned int hex_gui_tray_close;
|
unsigned int hex_gui_tray_close;
|
||||||
unsigned int hex_gui_tray_minimize;
|
unsigned int hex_gui_tray_minimize;
|
||||||
unsigned int hex_gui_tray_quiet;
|
unsigned int hex_gui_tray_quiet;
|
||||||
|
@ -394,12 +394,16 @@ tray_toggle_visibility (gboolean force_hide)
|
|||||||
if (force_hide || GTK_WIDGET_VISIBLE (win))
|
if (force_hide || GTK_WIDGET_VISIBLE (win))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
if (prefs.hex_gui_tray_away)
|
||||||
|
hexchat_command (ph, "ALLSERV AWAY");
|
||||||
gtk_window_get_position (win, &x, &y);
|
gtk_window_get_position (win, &x, &y);
|
||||||
screen = gtk_window_get_screen (win);
|
screen = gtk_window_get_screen (win);
|
||||||
gtk_widget_hide (GTK_WIDGET (win));
|
gtk_widget_hide (GTK_WIDGET (win));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (prefs.hex_gui_tray_away)
|
||||||
|
hexchat_command (ph, "ALLSERV BACK");
|
||||||
gtk_window_set_screen (win, screen);
|
gtk_window_set_screen (win, screen);
|
||||||
gtk_window_move (win, x, y);
|
gtk_window_move (win, x, y);
|
||||||
gtk_widget_show (GTK_WIDGET (win));
|
gtk_widget_show (GTK_WIDGET (win));
|
||||||
|
@ -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_("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_("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_("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
|
#ifndef WIN32
|
||||||
{ST_TOGGLE, N_("Only show tray balloons when hidden or iconified"), P_OFFINTNL(hex_gui_tray_quiet), 0, 0, 0},
|
{ST_TOGGLE, N_("Only show tray balloons when hidden or iconified"), P_OFFINTNL(hex_gui_tray_quiet), 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user