mask the result of g_io_channel_get_flags for the wanted flag
This commit is contained in:
parent
a3568305cd
commit
127c298ac4
@ -120,13 +120,13 @@ zenity_tree_handle_stdin (GIOChannel *channel,
|
|||||||
|
|
||||||
string = g_string_new (NULL);
|
string = g_string_new (NULL);
|
||||||
|
|
||||||
while (g_io_channel_get_flags(channel) != G_IO_FLAG_IS_READABLE)
|
while ((g_io_channel_get_flags(channel) & G_IO_FLAG_IS_READABLE) != G_IO_FLAG_IS_READABLE)
|
||||||
;
|
;
|
||||||
do {
|
do {
|
||||||
gint status;
|
gint status;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (g_io_channel_get_flags(channel) == G_IO_FLAG_IS_READABLE)
|
if (g_io_channel_get_flags(channel) & G_IO_FLAG_IS_READABLE)
|
||||||
status = g_io_channel_read_line_string (channel, string, NULL, &error);
|
status = g_io_channel_read_line_string (channel, string, NULL, &error);
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -645,7 +645,7 @@ zenity_tree_dialog_response (GtkWidget *widget, int response, gpointer data)
|
|||||||
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
|
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (channel != NULL && g_io_channel_get_flags (channel) == G_IO_FLAG_IS_READABLE)
|
if (channel != NULL && g_io_channel_get_flags (channel) & G_IO_FLAG_IS_READABLE)
|
||||||
g_io_channel_shutdown (channel, TRUE, NULL);
|
g_io_channel_shutdown (channel, TRUE, NULL);
|
||||||
|
|
||||||
gtk_main_quit ();
|
gtk_main_quit ();
|
||||||
|
Reference in New Issue
Block a user