diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-02-19 01:33:12 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-02-19 01:34:19 -0500 |
commit | 215c55f2b91017fdf1d8ffe5aeb8d54cd6368e6f (patch) | |
tree | 86470001bc25170a51b15c3741f03d5dcaec919a /gtk/gtkactionbar.c | |
parent | 832d90cc3a85a93ec77de7aa82dfa4ee89369718 (diff) | |
download | gtk+-215c55f2b91017fdf1d8ffe5aeb8d54cd6368e6f.tar.gz |
GtkActionBar: Implement destroy
Similar to map/unmap, this needs to follow the actual
widget tree. Without this, several test cases in
the templates test fail.
Diffstat (limited to 'gtk/gtkactionbar.c')
-rw-r--r-- | gtk/gtkactionbar.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk/gtkactionbar.c b/gtk/gtkactionbar.c index 012e4d10c9..994a078be6 100644 --- a/gtk/gtkactionbar.c +++ b/gtk/gtkactionbar.c @@ -155,6 +155,20 @@ gtk_action_bar_unmap (GtkWidget *widget) gtk_widget_unmap (priv->revealer); } +static void +gtk_action_bar_destroy (GtkWidget *widget) +{ + GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (GTK_ACTION_BAR (widget)); + + if (priv->revealer) + { + gtk_widget_destroy (priv->revealer); + priv->revealer = NULL; + } + + GTK_WIDGET_CLASS (gtk_action_bar_parent_class)->destroy (widget); +} + static GType gtk_action_bar_child_type (GtkContainer *container) { @@ -220,6 +234,7 @@ gtk_action_bar_class_init (GtkActionBarClass *klass) widget_class->hide = gtk_action_bar_hide; widget_class->map = gtk_action_bar_map; widget_class->unmap = gtk_action_bar_unmap; + widget_class->destroy = gtk_action_bar_destroy; container_class->add = gtk_action_bar_add; container_class->remove = gtk_action_bar_remove; |