From: <sa...@us...> - 2006-08-19 06:45:46
|
Revision: 16875 Author: sadrul Date: 2006-08-18 23:45:42 -0700 (Fri, 18 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16875&view=rev Log Message: ----------- some tweakings. Modified Paths: -------------- trunk/console/libgnt/gntmain.c Modified: trunk/console/libgnt/gntmain.c =================================================================== --- trunk/console/libgnt/gntmain.c 2006-08-19 06:02:26 UTC (rev 16874) +++ trunk/console/libgnt/gntmain.c 2006-08-19 06:45:42 UTC (rev 16875) @@ -663,21 +663,26 @@ { static GIOChannel *channel = NULL; char *filename; - + int result; + const char *locale; + if (channel) return; - channel = g_io_channel_unix_new(0); + channel = g_io_channel_unix_new(STDIN_FILENO); g_io_channel_set_encoding(channel, NULL, NULL); g_io_channel_set_buffered(channel, FALSE); g_io_channel_set_flags(channel, G_IO_FLAG_NONBLOCK, NULL ); - int result = g_io_add_watch(channel, - (G_IO_IN | G_IO_HUP | G_IO_ERR), - io_invoke, NULL); - const char *locale = setlocale(LC_ALL, ""); + result = g_io_add_watch_full(channel, G_PRIORITY_HIGH, + (G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI | G_IO_NVAL), + io_invoke, NULL, NULL); + + locale = setlocale(LC_ALL, ""); + g_io_channel_unref(channel); + if (locale && (strstr(locale, "UTF") || strstr(locale, "utf"))) ascii_only = FALSE; else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |