diff options
author | Benjamin Otte <otte@redhat.com> | 2014-03-07 21:45:18 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2014-03-13 02:02:50 +0100 |
commit | 66fae0330c5cdb68f50699ff2645ff0cf112911e (patch) | |
tree | f3108e25668f44b349da6609afcb3b8199b71ce0 /gtk/gtkcontainer.c | |
parent | 1ff2161431f7642e8435087b093679dd8edf57e6 (diff) | |
download | gtk+-66fae0330c5cdb68f50699ff2645ff0cf112911e.tar.gz |
a11y: Don't use signals
Instead, call functions directly. Fixes the fact that the signals
weren't disconnected even when the accessible was destroyed.
https://bugzilla.gnome.org/show_bug.cgi?id=725733
Diffstat (limited to 'gtk/gtkcontainer.c')
-rw-r--r-- | gtk/gtkcontainer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 14031397ff..1a99de3830 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -50,6 +50,7 @@ #include "gtkstylecontextprivate.h" #include "gtkwidgetpath.h" #include "a11y/gtkcontaineraccessible.h" +#include "a11y/gtkcontaineraccessibleprivate.h" /** * SECTION:gtkcontainer @@ -1556,6 +1557,8 @@ gtk_container_add (GtkContainer *container, } g_signal_emit (container, container_signals[ADD], 0, widget); + + _gtk_container_accessible_add (GTK_WIDGET (container), widget); } /** @@ -1581,7 +1584,13 @@ gtk_container_remove (GtkContainer *container, g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (container) || GTK_IS_ASSISTANT (container) || GTK_IS_ACTION_BAR (container)); + g_object_ref (widget); + g_signal_emit (container, container_signals[REMOVE], 0, widget); + + _gtk_container_accessible_remove (GTK_WIDGET (container), widget); + + g_object_unref (widget); } void |