From d5ef8448bb934c2147b23fea4f840f30f3841f3f Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 18 Jul 2011 18:18:05 +0200 Subject: [PATCH] checkbutton: Use gtk_widget_class_set_accessible_role() --- gtk/a11y/gtktogglebuttonaccessible.c | 5 +---- gtk/gtkcheckbutton.c | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gtk/a11y/gtktogglebuttonaccessible.c b/gtk/a11y/gtktogglebuttonaccessible.c index b891aef666..f89a6f423f 100644 --- a/gtk/a11y/gtktogglebuttonaccessible.c +++ b/gtk/a11y/gtktogglebuttonaccessible.c @@ -48,10 +48,7 @@ gtk_toggle_button_accessible_initialize (AtkObject *obj, g_signal_connect (data, "toggled", G_CALLBACK (gtk_toggle_button_accessible_toggled), NULL); - if (GTK_IS_CHECK_BUTTON (data)) - obj->role = ATK_ROLE_CHECK_BOX; - else - obj->role = ATK_ROLE_TOGGLE_BUTTON; + obj->role = ATK_ROLE_TOGGLE_BUTTON; } static void diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c index 9ceb6b1b28..3b8b950b82 100644 --- a/gtk/gtkcheckbutton.c +++ b/gtk/gtkcheckbutton.c @@ -87,6 +87,8 @@ gtk_check_button_class_init (GtkCheckButtonClass *class) class->draw_indicator = gtk_real_check_button_draw_indicator; + gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_CHECK_BOX); + gtk_widget_class_install_style_property (widget_class, g_param_spec_int ("indicator-size", P_("Indicator Size"),