[gtk+] checkbutton: Use gtk_widget_class_set_accessible_role()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] checkbutton: Use gtk_widget_class_set_accessible_role()
- Date: Mon, 18 Jul 2011 17:44:50 +0000 (UTC)
commit d5ef8448bb934c2147b23fea4f840f30f3841f3f
Author: Benjamin Otte <otte gnome org>
Date: Mon Jul 18 18:18:05 2011 +0200
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 b891aef..f89a6f4 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 9ceb6b1..3b8b950 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"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]