forked from AuroraMiddleware/gtk
Fix an a11y regression
This commit is contained in:
parent
0f1bcb0fd6
commit
59ac825fed
@ -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),
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user