diff options
author | Benjamin Otte <otte@gnome.org> | 2011-07-18 18:18:05 +0200 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2011-07-18 18:30:51 +0200 |
commit | d5ef8448bb934c2147b23fea4f840f30f3841f3f (patch) | |
tree | ee8206cff9c9ec277561535381284b185d37fa6a /gtk | |
parent | 0c9b046af0b0164f518cba702d26ae6f675297b8 (diff) | |
download | gtk+-d5ef8448bb934c2147b23fea4f840f30f3841f3f.tar.gz |
checkbutton: Use gtk_widget_class_set_accessible_role()
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/a11y/gtktogglebuttonaccessible.c | 5 | ||||
-rw-r--r-- | 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"), |