[gtk+/font-chooser] widget: Reset the accessible role when a new accessible type is set



commit 98778e8d74335c9e78abc4f7d3d40bab2ee66d4f
Author: Benjamin Otte <otte gnome org>
Date:   Mon Jul 18 17:41:01 2011 +0200

    widget: Reset the accessible role when a new accessible type is set
    
    We want the role to be kept in the accessible object. Using
    gtk_widget_class_set_accessible_role() is only meant as a quick
    workaround to requiring subclassing of the accessibles in the quite
    common case where a subclass does not change the accessible
    implementation at all and only has a different role.

 gtk/gtkwidget.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 905a39e..4f47dcd 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -11942,6 +11942,8 @@ gtk_widget_class_set_accessible_type (GtkWidgetClass *widget_class,
   priv = widget_class->priv;
 
   priv->accessible_type = type;
+  /* reset this - honoring the type's role is better. */
+  priv->accessible_role = ATK_ROLE_INVALID;
 }
 
 /**
@@ -11951,7 +11953,8 @@ gtk_widget_class_set_accessible_type (GtkWidgetClass *widget_class,
  *
  * Sets the default #AtkRole to be set on accessibles created for
  * widgets of @widget_class. Accessibles may decide to not honor this
- * setting if their role reporting is more refined.
+ * setting if their role reporting is more refined. Calls to 
+ * gtk_widget_class_set_accessible_type() will reset this value.
  *
  * In cases where you want more fine-grained control over the role of
  * accessibles created for @widget_class, you should provide your own



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