summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/a11y/gtktogglebuttonaccessible.c5
-rw-r--r--gtk/gtkcheckbutton.c2
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"),