Commit 59ac825f authored by Matthias Clasen's avatar Matthias Clasen

Fix an a11y regression

parent 0f1bcb0f
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),
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment