summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2012-11-23 04:40:35 -0500
committerTingPing <tingping@tingping.se>2012-11-23 04:40:35 -0500
commit2cafe9ff9be533b69a273c43ac73d2805c455ed3 (patch)
tree78c09b346e40124e5ebe3bf3c6b2c4c70a9dae72
parent0a5c8356eb3a86f1906733e76d2f802e9f986534 (diff)
show away/back in windows tray menu
-rw-r--r--src/fe-gtk/plugin-tray.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c
index 0e697a11..f71cce7a 100644
--- a/src/fe-gtk/plugin-tray.c
+++ b/src/fe-gtk/plugin-tray.c
@@ -537,11 +537,9 @@ static void
 tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata)
 {
 	static GtkWidget *menu;
-#ifndef WIN32
 	GtkWidget *submenu;
 	GtkWidget *item;
 	int away_status;
-#endif
 
 	/* ph may have an invalid context now */
 	hexchat_set_context (ph, hexchat_find_context (ph, NULL, NULL));
@@ -561,7 +559,7 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata)
 		tray_make_item (menu, _("_Hide Window"), tray_menu_restore_cb, NULL);
 	tray_make_item (menu, NULL, tray_menu_quit_cb, NULL);
 
-#ifndef WIN32 /* somehow this is broken on win32 */
+#ifndef WIN32 /* submenus are buggy on win32 */
 	submenu = mg_submenu (menu, _("_Blink on"));
 	blink_item (&prefs.hex_input_tray_chans, submenu, _("Channel Message"));
 	blink_item (&prefs.hex_input_tray_priv, submenu, _("Private Message"));
@@ -569,6 +567,10 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata)
 	/*blink_item (BIT_FILEOFFER, submenu, _("File Offer"));*/
 
 	submenu = mg_submenu (menu, _("_Change status"));
+#else /* so show away/back in main tray menu */
+	submenu = menu;
+#endif
+
 	away_status = tray_find_away_status ();
 	item = tray_make_item (submenu, _("_Away"), tray_foreach_server, "away");
 	if (away_status == 1)
@@ -578,8 +580,6 @@ tray_menu_cb (GtkWidget *widget, guint button, guint time, gpointer userdata)
 		gtk_widget_set_sensitive (item, FALSE);
 
 	tray_make_item (menu, NULL, tray_menu_quit_cb, NULL);
-#endif
-
 	mg_create_icon_item (_("_Preferences"), GTK_STOCK_PREFERENCES, menu, tray_menu_settings, NULL);
 	tray_make_item (menu, NULL, tray_menu_quit_cb, NULL);
 	mg_create_icon_item (_("_Quit"), GTK_STOCK_QUIT, menu, tray_menu_quit_cb, NULL);