apply sensitivity state to the Cancel button as well.

2007-05-16  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpfiledialog.c (gimp_file_dialog_set_sensitive):
	apply sensitivity state to the Cancel button as well.
	(gimp_file_dialog_progress_start): make the Cancel button sensitive
	if the progress is cancelable.

	* app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_start): if
	embedded in a GimpFileDialog, make its Cancel button sensitive if
	the progress is cancelable

svn path=/trunk/; revision=22506
This commit is contained in:
Sven Neumann 2007-05-16 08:21:35 +00:00 committed by Sven Neumann
parent 6ed5b34262
commit 484506176a
3 changed files with 23 additions and 4 deletions

View File

@ -1,3 +1,14 @@
2007-05-16 Sven Neumann <sven@gimp.org>
* app/widgets/gimpfiledialog.c (gimp_file_dialog_set_sensitive):
apply sensitivity state to the Cancel button as well.
(gimp_file_dialog_progress_start): make the Cancel button sensitive
if the progress is cancelable.
* app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_start): if
embedded in a GimpFileDialog, make its Cancel button sensitive if
the progress is cancelable
2007-05-16 Sven Neumann <sven@gimp.org>
* app/widgets/gimpthumbbox.[ch]: combined the two progress bars

View File

@ -176,6 +176,9 @@ gimp_file_dialog_progress_start (GimpProgress *progress,
message, cancelable);
gtk_widget_show (dialog->progress);
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
GTK_RESPONSE_CANCEL, cancelable);
return retval;
}
@ -378,10 +381,8 @@ gimp_file_dialog_set_sensitive (GimpFileDialog *dialog,
g_list_free (children);
if (sensitive)
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
GTK_RESPONSE_CANCEL, sensitive);
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
GTK_RESPONSE_CANCEL, sensitive);
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
GTK_RESPONSE_OK, sensitive);

View File

@ -199,11 +199,18 @@ gimp_thumb_box_progress_start (GimpProgress *progress,
if (! box->progress_active)
{
GtkProgressBar *bar = GTK_PROGRESS_BAR (box->progress);
GtkWidget *toplevel;
gtk_progress_bar_set_fraction (bar, 0.0);
box->progress_active = TRUE;
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (box));
if (GIMP_IS_FILE_DIALOG (toplevel))
gtk_dialog_set_response_sensitive (GTK_DIALOG (toplevel),
GTK_RESPONSE_CANCEL, cancelable);
return progress;
}