app/widgets/Makefile.am app/widgets/widgets-types.h new GtkVBox subclass
2004-08-11 Michael Natterer <mitch@gimp.org> * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpprogressbox.[ch]: new GtkVBox subclass featuring a label and a progressbar. Implements GimpProgressIterface. * app/widgets/gimpprogressdialog.[ch]: replaced label and progress by a GimpProgressBox. Delegate most progress functionality to it. * app/widgets/gimpwidgets-utils.[ch]: factored out utility function gimp_dialog_set_sensitive(). * app/widgets/gimpfiledialog.c (gimp_file_dialog_set_sensitive): use it. * app/gui/file-open-location-dialog.c (file_open_location_response): embed the called file procedure's progress using a GimpProgressBox.
This commit is contained in:
committed by
Michael Natterer
parent
95607cce19
commit
06ea7dbd96
@ -864,3 +864,31 @@ gimp_window_set_hint (GtkWindow *window,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gimp_dialog_set_sensitive (GtkDialog *dialog,
|
||||
gboolean sensitive)
|
||||
{
|
||||
GList *children;
|
||||
GList *list;
|
||||
|
||||
g_return_if_fail (GTK_IS_DIALOG (dialog));
|
||||
|
||||
children = gtk_container_get_children (GTK_CONTAINER (dialog->vbox));
|
||||
|
||||
for (list = children; list; list = g_list_next (list))
|
||||
{
|
||||
/* skip the last item (the action area) */
|
||||
if (! g_list_next (list))
|
||||
break;
|
||||
|
||||
gtk_widget_set_sensitive (list->data, sensitive);
|
||||
}
|
||||
|
||||
g_list_free (children);
|
||||
|
||||
if (sensitive)
|
||||
gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_CANCEL, sensitive);
|
||||
|
||||
gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, sensitive);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user