[gtk+/font-chooser] accellabel: Use gtk_widget_class_set_accessible_role()



commit bba6d2e8ec910b31fc78b68a3164e75302441c4e
Author: Benjamin Otte <otte gnome org>
Date:   Mon Jul 18 18:15:47 2011 +0200

    accellabel: Use gtk_widget_class_set_accessible_role()

 gtk/a11y/gtklabelaccessible.c |    5 +----
 gtk/gtkaccellabel.c           |    2 ++
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/a11y/gtklabelaccessible.c b/gtk/a11y/gtklabelaccessible.c
index b61848d..b794385 100644
--- a/gtk/a11y/gtklabelaccessible.c
+++ b/gtk/a11y/gtklabelaccessible.c
@@ -63,10 +63,7 @@ gtk_label_accessible_initialize (AtkObject *obj,
         }
     }
 
-  if (GTK_IS_ACCEL_LABEL (widget))
-    obj->role = ATK_ROLE_ACCEL_LABEL;
-  else
-    obj->role = ATK_ROLE_LABEL;
+  obj->role = ATK_ROLE_LABEL;
 }
 
 static gboolean
diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c
index 734e511..faf469a 100644
--- a/gtk/gtkaccellabel.c
+++ b/gtk/gtkaccellabel.c
@@ -144,6 +144,8 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class)
   widget_class->get_preferred_width = gtk_accel_label_get_preferred_width;
   widget_class->destroy = gtk_accel_label_destroy;
 
+  gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_ACCEL_LABEL);
+
   class->signal_quote1 = g_strdup ("<:");
   class->signal_quote2 = g_strdup (":>");
 



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