diff gtk/gtkeventloop.c @ 14730:5b389aacc06b

[gaim-migrate @ 17486] Add the thread-based win32 giochannel implementation from glib 2.6.6 to our src tree. This way we can use GTK+ >= 2.8.0 and still use the iochannel implementation that works for us. Hopefully at some point we can use the more efficient 2.8.x giochannel implementation. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 16 Oct 2006 17:14:41 +0000
parents 009db0b357b5
children 5edfb6bce20e
line wrap: on
line diff
--- a/gtk/gtkeventloop.c	Mon Oct 16 14:50:20 2006 +0000
+++ b/gtk/gtkeventloop.c	Mon Oct 16 17:14:41 2006 +0000
@@ -26,6 +26,7 @@
 #include <glib.h>
 #include "gtkeventloop.h"
 #include "eventloop.h"
+#include "win32dep.h"
 
 #define GAIM_GTK_READ_COND  (G_IO_IN | G_IO_HUP | G_IO_ERR)
 #define GAIM_GTK_WRITE_COND (G_IO_OUT | G_IO_HUP | G_IO_ERR | G_IO_NVAL)
@@ -92,7 +93,11 @@
 	if (condition & GAIM_INPUT_WRITE)
 		cond |= GAIM_GTK_WRITE_COND;
 
+#ifdef _WIN32
+	channel = wgaim_g_io_channel_win32_new_socket(fd);
+#else
 	channel = g_io_channel_unix_new(fd);
+#endif
 	closure->result = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, cond,
 					      gaim_gtk_io_invoke, closure, gaim_gtk_io_destroy);