forked from AuroraMiddleware/gtk
separator: Use gtk_widget_class_accessible_set_role()
This commit is contained in:
parent
017d02b9de
commit
094785bd68
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user