39 lines
1.0 KiB
Diff
39 lines
1.0 KiB
Diff
From c0198befd34288a1c2c6ae6f2523076b8bd8b0d4 Mon Sep 17 00:00:00 2001
|
|
From: iain holmes <iain@xamarin.com>
|
|
Date: Tue, 24 Jan 2017 10:53:39 +0000
|
|
Subject: [PATCH 1/1] [A11y] Emit the container::add signal when inserting a
|
|
menu
|
|
|
|
---
|
|
gtk/gtkmenushell.c | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
|
|
index a7ad7b5..cd170fe 100644
|
|
--- a/gtk/gtkmenushell.c
|
|
+++ b/gtk/gtkmenushell.c
|
|
@@ -521,6 +521,9 @@ gtk_menu_shell_real_insert (GtkMenuShell *menu_shell,
|
|
menu_shell->children = g_list_insert (menu_shell->children, child, position);
|
|
|
|
gtk_widget_set_parent (child, GTK_WIDGET (menu_shell));
|
|
+
|
|
+ // Emit the container::add signal so the accessibility system can pick it up
|
|
+ g_signal_emit_by_name (G_OBJECT (menu_shell), "add", child);
|
|
}
|
|
|
|
void
|
|
@@ -1039,6 +1042,10 @@ static void
|
|
gtk_menu_shell_add (GtkContainer *container,
|
|
GtkWidget *widget)
|
|
{
|
|
+ if (widget->parent == container) {
|
|
+ return;
|
|
+ }
|
|
+
|
|
gtk_menu_shell_append (GTK_MENU_SHELL (container), widget);
|
|
}
|
|
|
|
--
|
|
2.10.1 (Apple Git-78)
|
|
|