[gtk+] GtkActionBar: Implement destroy
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkActionBar: Implement destroy
- Date: Wed, 19 Feb 2014 07:03:34 +0000 (UTC)
commit 215c55f2b91017fdf1d8ffe5aeb8d54cd6368e6f
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Feb 19 01:33:12 2014 -0500
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.
gtk/gtkactionbar.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkactionbar.c b/gtk/gtkactionbar.c
index 012e4d1..994a078 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]