diff options
author | Arx Cruz <arxcruz@gnome.org> | 2013-06-04 16:27:48 -0300 |
---|---|---|
committer | Arx Cruz <arxcruz@gnome.org> | 2013-06-04 16:27:48 -0300 |
commit | c89ce9c3812fdc3a2637fd76b42a07385ad50684 (patch) | |
tree | ab5b9d39276e1ccd641b5533a1f88a78d5e64b0f /src/progress.c | |
parent | 7c234ed9b71d5f009abff509ef2bf576f61a0cbb (diff) | |
download | zenity-c89ce9c3812fdc3a2637fd76b42a07385ad50684.tar.gz |
Bug #653468. Fixed by Kurt Miller <kurt@intricatesoftware.com>.
Fix the broken auto-close option in progress and list dialogs.
Diffstat (limited to 'src/progress.c')
-rw-r--r-- | src/progress.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/progress.c b/src/progress.c index c382d74..055699c 100644 --- a/src/progress.c +++ b/src/progress.c @@ -81,12 +81,13 @@ zenity_progress_handle_stdin (GIOChannel *channel, static GObject *progress_bar; static GObject *progress_label; float percentage = 0.0; + GIOStatus status = G_IO_STATUS_NORMAL; progress_data = (ZenityProgressData *) data; progress_bar = gtk_builder_get_object (builder, "zenity_progress_bar"); progress_label = gtk_builder_get_object (builder, "zenity_progress_text"); - if ((condition == G_IO_IN) || (condition == G_IO_IN + G_IO_HUP)) { + if ((condition & G_IO_IN) != 0) { GString *string; GError *error = NULL; @@ -95,8 +96,6 @@ zenity_progress_handle_stdin (GIOChannel *channel, while (channel->is_readable != TRUE) ; do { - gint status; - do { status = g_io_channel_read_line_string (channel, string, NULL, &error); @@ -175,11 +174,11 @@ zenity_progress_handle_stdin (GIOChannel *channel, } } - } while (g_io_channel_get_buffer_condition (channel) == G_IO_IN); + } while ((g_io_channel_get_buffer_condition (channel) & G_IO_IN) == G_IO_IN && status != G_IO_STATUS_EOF); g_string_free (string, TRUE); } - if ((condition != G_IO_IN) && (condition != G_IO_IN + G_IO_HUP)) { + if ((condition & G_IO_IN) != G_IO_IN || status == G_IO_STATUS_EOF) { /* We assume that we are done, so stop the pulsating and de-sensitize the buttons */ GtkWidget *button; |