[gtk/menubutton-no-button: 2/4] a11y: Adapt to menu button changes



commit 9111541807c3d2c82d408f823b1b6d487a46681b
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat May 18 04:58:08 2019 +0000

    a11y: Adapt to menu button changes

 gtk/a11y/gtkmenubuttonaccessible.c | 4 +++-
 gtk/a11y/gtkmenubuttonaccessible.h | 6 +++---
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gtk/a11y/gtkmenubuttonaccessible.c b/gtk/a11y/gtkmenubuttonaccessible.c
index d4a9162b60..9a4c480d19 100644
--- a/gtk/a11y/gtkmenubuttonaccessible.c
+++ b/gtk/a11y/gtkmenubuttonaccessible.c
@@ -22,13 +22,15 @@
 #include "gtkmenubuttonaccessible.h"
 
 
-G_DEFINE_TYPE (GtkMenuButtonAccessible, gtk_menu_button_accessible, GTK_TYPE_TOGGLE_BUTTON_ACCESSIBLE)
+G_DEFINE_TYPE (GtkMenuButtonAccessible, gtk_menu_button_accessible, GTK_TYPE_WIDGET_ACCESSIBLE)
 
 static void
 gtk_menu_button_accessible_initialize (AtkObject *accessible,
                                         gpointer   data)
 {
   ATK_OBJECT_CLASS (gtk_menu_button_accessible_parent_class)->initialize (accessible, data);
+
+  accessible->role = ATK_ROLE_TOGGLE_BUTTON;
 }
 
 static gint
diff --git a/gtk/a11y/gtkmenubuttonaccessible.h b/gtk/a11y/gtkmenubuttonaccessible.h
index 059f209fc9..17168a2eb7 100644
--- a/gtk/a11y/gtkmenubuttonaccessible.h
+++ b/gtk/a11y/gtkmenubuttonaccessible.h
@@ -22,7 +22,7 @@
 #error "Only <gtk/gtk-a11y.h> can be included directly."
 #endif
 
-#include <gtk/a11y/gtktogglebuttonaccessible.h>
+#include <gtk/a11y/gtkwidgetaccessible.h>
 
 G_BEGIN_DECLS
 
@@ -39,14 +39,14 @@ typedef struct _GtkMenuButtonAccessiblePrivate GtkMenuButtonAccessiblePrivate;
 
 struct _GtkMenuButtonAccessible
 {
-  GtkToggleButtonAccessible parent;
+  GtkWidgetAccessible parent;
 
   GtkMenuButtonAccessiblePrivate *priv;
 };
 
 struct _GtkMenuButtonAccessibleClass
 {
-  GtkToggleButtonAccessibleClass parent_class;
+  GtkWidgetAccessibleClass parent_class;
 };
 
 GDK_AVAILABLE_IN_ALL


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]