diff options
author | Mike Newman <MikeGTN@src.gnome.org> | 2003-05-24 09:15:50 +0000 |
---|---|---|
committer | Mike Newman <MikeGTN@src.gnome.org> | 2003-05-24 09:15:50 +0000 |
commit | 25d20adbd11319e7224ada5970c1a1b1ba6557df (patch) | |
tree | 878e2ea75264772813be0b57fb5d6f07d0aa4c96 /src/progress.c | |
parent | Patch from Dagmar d'Surreal <dagmar@speakeasy.net> to correct help docs (diff) | |
download | zenity-25d20adbd11319e7224ada5970c1a1b1ba6557df.tar.gz zenity-25d20adbd11319e7224ada5970c1a1b1ba6557df.tar.bz2 zenity-25d20adbd11319e7224ada5970c1a1b1ba6557df.zip |
Fix typo in gdialog wrapper. Sensitize OK button in progress when 100% reached.
Diffstat (limited to 'src/progress.c')
-rw-r--r-- | src/progress.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/progress.c b/src/progress.c index f7444c42..aa06e7d4 100644 --- a/src/progress.c +++ b/src/progress.c @@ -105,9 +105,13 @@ zenity_progress_handle_stdin (GIOChannel *channel, /* Now try to convert the thing to a number */ percentage = atoi (string->str); - if (percentage > 100) + if (percentage >= 100) { + GtkWidget *button; + button = glade_xml_get_widget( glade_dialog,"zenity_progress_ok_button"); gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar), 1.0); - else + gtk_widget_set_sensitive(GTK_WIDGET (button), TRUE); + gtk_widget_grab_focus(GTK_WIDGET (button)); + } else gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar), percentage / 100.0); } |