summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Yelavich <[email protected]>2016-10-11 19:53:55 +1100
committermonsta <[email protected]>2016-10-18 16:31:46 +0300
commit13a5519d3eee32036290adab4fa1d6397d691bfa (patch)
treea5c679c76451fb52e9571c699ec5e375cf189b03
parenta8470c69525fd6b0c2c94755298753f90b813831 (diff)
downloadcaja-13a5519d3eee32036290adab4fa1d6397d691bfa.tar.bz2
caja-13a5519d3eee32036290adab4fa1d6397d691bfa.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
}