aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2014-11-06 08:48:37 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2014-11-06 08:48:37 +0000
commit74c037633fea44650154911e5128b1bd6661e115 (patch)
tree25d4f80cdb9459cda98e6ffd0940382ab4f6142c
parentc839eb55e48796e60bb075dbc6d8867c6af371bd (diff)
made 'Toggle window on trayicon click' option work on Windows 7.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3432 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog5
-rw-r--r--src/trayicon.c10
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 15a2e586..081323a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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,