diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2006-12-04 17:56:30 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-12-04 17:56:30 +0000 |
commit | 59ac825fed8c9102a379d43a2e94277270111ac6 (patch) | |
tree | 1da8d700cf221645b763bbd5791768d13e5b2c7a | |
parent | 0f1bcb0fd6b2c4d7488e7031d3c7fcd8fef0a79a (diff) | |
download | gtk+-59ac825fed8c9102a379d43a2e94277270111ac6.tar.gz |
Fix an a11y regression
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gtk/gtkmessagedialog.c | 15 |
2 files changed, 20 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2006-12-04 Matthias Clasen <mclasen@redhat.com> + + * gtk/gtkmessagedialog.c (setup_type): Set a11y name and role + since we no longer set window titles. + 2006-12-04 Christian Persch <chpe@cvs.gnome.org> * gtk/gtkpagesetup.c: (gtk_page_setup_get_paper_size), diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c index 9b33063280..c67277ebaf 100644 --- a/gtk/gtkmessagedialog.c +++ b/gtk/gtkmessagedialog.c @@ -29,6 +29,7 @@ #include <string.h> #include "gtkmessagedialog.h" +#include "gtkaccessible.h" #include "gtklabel.h" #include "gtkhbox.h" #include "gtkvbox.h" @@ -308,6 +309,7 @@ setup_type (GtkMessageDialog *dialog, { GtkMessageDialogPrivate *priv = GTK_MESSAGE_DIALOG_GET_PRIVATE (dialog); const gchar *stock_id = NULL; + AtkObject *atk_obj; priv->message_type = type; @@ -340,6 +342,19 @@ setup_type (GtkMessageDialog *dialog, if (stock_id) gtk_image_set_from_stock (GTK_IMAGE (dialog->image), stock_id, GTK_ICON_SIZE_DIALOG); + + atk_obj = gtk_widget_get_accessible (GTK_WIDGET (dialog)); + if (GTK_IS_ACCESSIBLE (atk_obj)) + { + atk_object_set_role (atk_obj, ATK_ROLE_ALERT); + if (stock_id) + { + GtkStockItem item; + + gtk_stock_lookup (stock_id, &item); + atk_object_set_name (atk_obj, item.label); + } + } } static void |