diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-11-02 13:20:17 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-11-02 13:20:17 +0000 |
commit | 78fa1576e6e094fd741f2a1caac3690cf0fa0876 (patch) | |
tree | 25906c92b8f3402948fe74e903c77a10b1f154cf /gtk/gtkdialog.c | |
parent | daa04f480ffdd4de8d79e36530fc8331afee30af (diff) | |
download | gtk+-78fa1576e6e094fd741f2a1caac3690cf0fa0876.tar.gz |
Iterate through children of the action area, not of the vbox. (#58278,
Fri Nov 2 08:17:06 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdialog.c (gtk_dialog_set_response_sensitive):
Iterate through children of the action area, not of
the vbox. (#58278, Sergey Kuzminov)
Diffstat (limited to 'gtk/gtkdialog.c')
-rw-r--r-- | gtk/gtkdialog.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 702cba2911..12325f7e90 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -613,6 +613,34 @@ gtk_dialog_add_buttons (GtkDialog *dialog, va_end (args); } +static GtkWidget * +find_child_by_response_id (GtkDialog *dialog, + gint response id) +{ + GList *children; + GList *tmp_list; + GtkWidget *result = NULL: + + children = gtk_container_get_children (GTK_CONTAINER (dialog->action_area)); + + tmp_list = children; + while (tmp_list != NULL) + { + GtkWidget *widget = tmp_list->data; + ResponseData *rd = g_object_get_data (G_OBJECT (widget), + "gtk-dialog-response-data"); + + if (rd && rd->response_id == response_id) + { + result = widget; + gtk_widget_set_sensitive (widget, setting); + + tmp_list = g_list_next (tmp_list); + } + + g_list_free (children); +} + /** * gtk_dialog_set_response_sensitive: * @dialog: a #GtkDialog @@ -632,7 +660,7 @@ gtk_dialog_set_response_sensitive (GtkDialog *dialog, GList *children; GList *tmp_list; - children = gtk_container_get_children (GTK_CONTAINER (dialog)); + children = gtk_container_get_children (GTK_CONTAINER (dialog->action_area)); tmp_list = children; while (tmp_list != NULL) |