[gtk+/font-chooser] separator: Use gtk_widget_class_accessible_set_role()



commit c7bd14e92e84df97896cb3ed699ceff540835b3f
Author: Benjamin Otte <otte gnome org>
Date:   Mon Jul 18 14:23:19 2011 +0200

    separator: Use gtk_widget_class_accessible_set_role()

 gtk/gtkseparator.c |   16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkseparator.c b/gtk/gtkseparator.c
index d67ab2e..f8c0202 100644
--- a/gtk/gtkseparator.c
+++ b/gtk/gtkseparator.c
@@ -72,7 +72,6 @@ static void       gtk_separator_get_preferred_height
                                               gint           *natural);
 static gboolean   gtk_separator_draw         (GtkWidget      *widget,
                                               cairo_t        *cr);
-static AtkObject *gtk_separator_get_accessible (GtkWidget    *widget);
 
 
 G_DEFINE_TYPE_WITH_CODE (GtkSeparator, gtk_separator, GTK_TYPE_WIDGET,
@@ -93,7 +92,8 @@ gtk_separator_class_init (GtkSeparatorClass *class)
   widget_class->get_preferred_height = gtk_separator_get_preferred_height;
 
   widget_class->draw = gtk_separator_draw;
-  widget_class->get_accessible = gtk_separator_get_accessible;
+
+  gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_SEPARATOR);
 
   g_object_class_override_property (object_class, PROP_ORIENTATION, "orientation");
 
@@ -274,18 +274,6 @@ gtk_separator_draw (GtkWidget *widget,
   return FALSE;
 }
 
-static AtkObject *
-gtk_separator_get_accessible (GtkWidget *widget)
-{
-  AtkObject *obj;
-
-  obj = GTK_WIDGET_CLASS (gtk_separator_parent_class)->get_accessible (widget);
-
-  atk_object_set_role (obj, ATK_ROLE_SEPARATOR);
-
-  return obj;
-}
-
 /**
  * gtk_separator_new:
  * @orientation: the separator's orientation.



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