Mercurial > pidgin.yaz
changeset 23784:d9d388a27d01
Use the "Flash taskbar button X times" value from the win32 Tweak UI "Prevent
applications from stealing focus" settings to determine how many times to flash
the taskbar for incoming messages.
References #1502,#2372,#117
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Thu, 14 Aug 2008 04:28:47 +0000 |
parents | a5bfc59b0c6e |
children | 0bdff80233fb |
files | pidgin/win32/gtkwin32dep.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/win32/gtkwin32dep.c Thu Aug 14 04:17:21 2008 +0000 +++ b/pidgin/win32/gtkwin32dep.c Thu Aug 14 04:28:47 2008 +0000 @@ -319,8 +319,10 @@ winpidgin_window_flash(window, FALSE); - if ((handler_id = g_object_get_data(G_OBJECT(window), "flash_stop_handler_id"))) + if ((handler_id = g_object_get_data(G_OBJECT(window), "flash_stop_handler_id"))) { g_signal_handler_disconnect(G_OBJECT(window), (gulong) GPOINTER_TO_UINT(handler_id)); + g_object_steal_data(G_OBJECT(window), "flash_stop_handler_id"); + } return FALSE; } @@ -346,7 +348,10 @@ info.cbSize = sizeof(FLASHWINFO); info.hwnd = GDK_WINDOW_HWND(gdkwin); if (flash) { + DWORD flashCount; info.uCount = 3; + if (SystemParametersInfo(SPI_GETFOREGROUNDFLASHCOUNT, 0, &flashCount, 0)) + info.uCount = flashCount; info.dwFlags = FLASHW_ALL | FLASHW_TIMER; } else info.dwFlags = FLASHW_STOP;