From ec0fb449584042363fd951530ec60ccc4e90e6f4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 6 Mar 2020 12:55:01 -0800 Subject: [PATCH] a11y: Stop using type hints --- gtk/a11y/gtkwindowaccessible.c | 35 ---------------------------------- 1 file changed, 35 deletions(-) diff --git a/gtk/a11y/gtkwindowaccessible.c b/gtk/a11y/gtkwindowaccessible.c index f5407d4812..604148e7a1 100644 --- a/gtk/a11y/gtkwindowaccessible.c +++ b/gtk/a11y/gtkwindowaccessible.c @@ -289,40 +289,6 @@ gtk_window_accessible_ref_child (AtkObject *object, return g_object_ref (gtk_widget_get_accessible (ref_child)); } -static AtkAttributeSet * -gtk_widget_accessible_get_attributes (AtkObject *obj) -{ - GtkWidget *window; - GdkSurfaceTypeHint hint; - AtkAttributeSet *attributes; - AtkAttribute *attr; - GEnumClass *class; - GEnumValue *value; - - attributes = ATK_OBJECT_CLASS (gtk_window_accessible_parent_class)->get_attributes (obj); - - attr = g_new (AtkAttribute, 1); - attr->name = g_strdup ("window-type"); - - window = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); - hint = gtk_window_get_type_hint (GTK_WINDOW (window)); - - class = g_type_class_ref (GDK_TYPE_SURFACE_TYPE_HINT); - for (value = class->values; value->value_name; value++) - { - if (hint == value->value) - { - attr->value = g_strdup (value->value_nick); - break; - } - } - g_type_class_unref (class); - - attributes = g_slist_append (attributes, attr); - - return attributes; -} - static void gtk_window_accessible_class_init (GtkWindowAccessibleClass *klass) { @@ -338,7 +304,6 @@ gtk_window_accessible_class_init (GtkWindowAccessibleClass *klass) class->focus_event = gtk_window_accessible_focus_event; class->get_n_children = gtk_window_accessible_get_n_children; class->ref_child = gtk_window_accessible_ref_child; - class->get_attributes = gtk_widget_accessible_get_attributes; } static void