[gtk+/quartz-integration: 503/563] Don't overwrite roles



commit d3798246c998d5f68c2d6c8cc6a9036fecd48bb3
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jul 1 00:48:25 2011 -0400

    Don't overwrite roles
    
    Otherwise, every GtkBox subclass will have to override
    get_accessible just to keep their roles.

 gtk/gtkbox.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index e3fb707..69b3d77 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -1361,7 +1361,8 @@ gtk_box_get_accessible (GtkWidget *widget)
 
   obj = GTK_WIDGET_CLASS (gtk_box_parent_class)->get_accessible (widget);
 
-  atk_object_set_role (obj, ATK_ROLE_FILLER);
+  if (atk_object_get_role (obj) == ATK_ROLE_UNKNOWN)
+    atk_object_set_role (obj, ATK_ROLE_FILLER);
 
   return obj;
 }



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