summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Yelavich <[email protected]>2016-10-11 19:53:55 +1100
committerLuke Yelavich <[email protected]>2016-10-11 19:53:55 +1100
commitc27cc572f8f33bdfbbc3dfea8786d05a1818b910 (patch)
treec576af9bcb100927b181a4dbeee585a0fd9ba378
parent99a9c6e7c6a67484c029518bdb31160469627701 (diff)
downloadcaja-c27cc572f8f33bdfbbc3dfea8786d05a1818b910.tar.bz2
caja-c27cc572f8f33bdfbbc3dfea8786d05a1818b910.tar.xz
EelLabeledImageButton classes do not need a custom accessible object under GKT 3
-rw-r--r--eel/eel-labeled-image.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/eel/eel-labeled-image.c b/eel/eel-labeled-image.c
index 27f13d25..e357db60 100644
--- a/eel/eel-labeled-image.c
+++ b/eel/eel-labeled-image.c
@@ -2323,31 +2323,9 @@ static void
eel_labeled_image_accessible_initialize (AtkObject *accessible,
gpointer widget)
{
-#if GTK_CHECK_VERSION(3, 0, 0)
- a11y_parent_class->initialize (accessible, widget);
-
- if (GTK_IS_CHECK_BUTTON (widget))
- {
- atk_object_set_role (accessible, ATK_ROLE_CHECK_BOX);
- }
- else if (GTK_IS_RADIO_BUTTON (widget))
- {
- atk_object_set_role (accessible, ATK_ROLE_RADIO_BUTTON);
- }
- else if (GTK_IS_TOGGLE_BUTTON (widget))
- {
- atk_object_set_role (accessible, ATK_ROLE_TOGGLE_BUTTON);
- }
- else if (GTK_IS_BUTTON (widget))
- {
- atk_object_set_role (accessible, ATK_ROLE_PUSH_BUTTON);
- }
- else
- {
- atk_object_set_role (accessible, ATK_ROLE_IMAGE);
- }
-#else
a11y_parent_class->initialize (accessible, widget);
+#if GTK_CHECK_VERSION(3, 0, 0)
+ atk_object_set_role (accessible, ATK_ROLE_IMAGE);
#endif
}
@@ -2540,11 +2518,7 @@ eel_labeled_image_get_accessible (GtkWidget *widget)
static void
eel_labeled_image_button_class_init (GtkWidgetClass *klass)
{
-#if GTK_CHECK_VERSION(3, 0, 0)
- gtk_widget_class_set_accessible_type (GTK_WIDGET_CLASS (klass),
- eel_labeled_image_accessible_get_type ());
-
-#else
+#if !GTK_CHECK_VERSION(3, 0, 0)
klass->get_accessible = eel_labeled_image_get_accessible;
#endif
}