Fix typo in gdialog wrapper. Sensitize OK button in progress when 100% reached.
This commit is contained in:
parent
1acd9cfed8
commit
25d20adbd1
@ -1,3 +1,8 @@
|
||||
2003-05-24 Mike Newman <mikegtn@gnome.org>
|
||||
|
||||
* src/progress.c: Make "OK" sensitive if progress bar has
|
||||
reached 100%, and give it focus.
|
||||
|
||||
2003-05-24 Glynn Foster <glynn.foster@sun.com>
|
||||
|
||||
* help/C/zenity.xml: Patch from Dagmar d'Surreal
|
||||
|
12
src/gdialog
12
src/gdialog
@ -33,8 +33,8 @@ ARG: while ($argn < $args) {
|
||||
get_arg;
|
||||
|
||||
|
||||
# Section 1 : Args which gdialog expects BEFORE box options
|
||||
# --clear, --backtitle have no obvious effect - ignored
|
||||
# Section 1 : Args which gdialog expects BEFORE box options
|
||||
# --clear, --backtitle have no obvious effect - ignored
|
||||
|
||||
if ($element eq "--title") {
|
||||
|
||||
@ -60,7 +60,7 @@ ARG: while ($argn < $args) {
|
||||
next ARG;
|
||||
}
|
||||
|
||||
# Section 2 : Box Options and subsequent args
|
||||
# Section 2 : Box Options and subsequent args
|
||||
|
||||
if ($element eq "--msgbox" || $element eq "--infobox") {
|
||||
|
||||
@ -144,8 +144,8 @@ ARG: while ($argn < $args) {
|
||||
# Loop over the remainder of the commandline
|
||||
# discarding the 'status' and 'tag' args of each item
|
||||
# and using the 'item' for display in our second column
|
||||
# also pass a NULL argument since zenity can't set the status
|
||||
# of a row like gdialog can
|
||||
# also pass a fake NULL argument since zenity can't set
|
||||
# the status of a row like gdialog can
|
||||
|
||||
while ($argn < $args) {
|
||||
get_arg;
|
||||
@ -162,7 +162,7 @@ ARG: while ($argn < $args) {
|
||||
|
||||
# a gdialog --menu is just a one column zenity --list
|
||||
# Use the 'text' arg as a second column header
|
||||
# FIXME: or should it be the dialog text?
|
||||
# FIXME: or should it be the dialog text, or both?
|
||||
|
||||
$command .= "--list --column $element ";
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user