pidgin: 87f91e5f: Use the "Flash taskbar button X times" v...

datallah at pidgin.im datallah at pidgin.im
Thu Aug 14 00:40:58 EDT 2008


-----------------------------------------------------------------
Revision: 87f91e5f4e7f627329c2b7edf56773f58696a8cf
Ancestor: 66d0a80d9160a71452ff5c0e192723454da0515e
Author: datallah at pidgin.im
Date: 2008-08-14T04:28:47
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/87f91e5f4e7f627329c2b7edf56773f58696a8cf

Modified files:
        pidgin/win32/gtkwin32dep.c

ChangeLog: 

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

-------------- next part --------------
============================================================
--- pidgin/win32/gtkwin32dep.c	e797f8ff1637384946b401b12ca2596c10d8102f
+++ pidgin/win32/gtkwin32dep.c	55a8531d83b87d00ef47820e831f8fdaa266a7a4
@@ -319,8 +319,10 @@ static gboolean stop_flashing(GtkWidget 
 
 	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 @@ winpidgin_window_flash(GtkWindow *window
 		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;


More information about the Commits mailing list