diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/trayicon.c | 10 |
2 files changed, 14 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2014-11-06 + + * src/trayicon.c: win32: made 'Toggle window on trayicon click' option + work on Windows 7. + 2014-11-05 * libsylph/prefs_common.[ch] diff --git a/src/trayicon.c b/src/trayicon.c index 8a2427dc..ef56dc14 100644 --- a/src/trayicon.c +++ b/src/trayicon.c @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2012 Hiroyuki Yamamoto + * Copyright (C) 1999-2014 Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -244,11 +244,19 @@ static void trayicon_activated(GtkStatusIcon *status_icon, gpointer data) { MainWindow *mainwin = (MainWindow *)data; +#ifdef G_OS_WIN32 + if (prefs_common.toggle_window_on_trayicon_click && + !mainwin->window_hidden && !mainwin->window_obscured) + gtk_window_iconify(GTK_WINDOW(mainwin->window)); + else + main_window_popup(mainwin); +#else if (prefs_common.toggle_window_on_trayicon_click && gtk_window_is_active(GTK_WINDOW(mainwin->window))) gtk_window_iconify(GTK_WINDOW(mainwin->window)); else main_window_popup(mainwin); +#endif } static void trayicon_popup_menu_cb(GtkStatusIcon *status_icon, guint button, |