[gtk+] messagedialog: Use gtk_widget_class_set_accessible_role()



commit c40875ad51c093279929bb5e052fcbd43d93bf0f
Author: Benjamin Otte <otte gnome org>
Date:   Mon Jul 18 17:55:30 2011 +0200

    messagedialog: Use gtk_widget_class_set_accessible_role()

 gtk/a11y/gtkwindowaccessible.c |    2 --
 gtk/gtkmessagedialog.c         |    2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/a11y/gtkwindowaccessible.c b/gtk/a11y/gtkwindowaccessible.c
index ab041fd..ee3bbc6 100644
--- a/gtk/a11y/gtkwindowaccessible.c
+++ b/gtk/a11y/gtkwindowaccessible.c
@@ -111,8 +111,6 @@ gtk_window_accessible_initialize (AtkObject *obj,
 
   if (GTK_IS_FONT_SELECTION_DIALOG (widget))
     obj->role = ATK_ROLE_FONT_CHOOSER;
-  else if (GTK_IS_MESSAGE_DIALOG (widget))
-    obj->role = ATK_ROLE_ALERT;
   else
     {
       const gchar *name;
diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c
index 673319a..bd3a130 100644
--- a/gtk/gtkmessagedialog.c
+++ b/gtk/gtkmessagedialog.c
@@ -177,6 +177,8 @@ gtk_message_dialog_class_init (GtkMessageDialogClass *class)
   
   widget_class->style_updated = gtk_message_dialog_style_updated;
 
+  gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_ALERT);
+
   gobject_class->set_property = gtk_message_dialog_set_property;
   gobject_class->get_property = gtk_message_dialog_get_property;
   



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]