[gnome-contacts] Properly free internal children when destroyed
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Properly free internal children when destroyed
- Date: Tue, 20 Dec 2011 21:37:04 +0000 (UTC)
commit a53509c45e72ea6566e0cdcd6948363db357edd7
Author: Alexander Larsson <alexl redhat com>
Date: Tue Dec 20 22:36:45 2011 +0100
Properly free internal children when destroyed
src/gtk-notification.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/gtk-notification.c b/src/gtk-notification.c
index 72e53c3..d2af5ad 100644
--- a/src/gtk-notification.c
+++ b/src/gtk-notification.c
@@ -146,6 +146,21 @@ gtk_notification_finalize (GObject *object)
}
static void
+gtk_notification_destroy (GtkWidget *widget)
+{
+ GtkNotification *notification = GTK_NOTIFICATION (widget);
+ GtkNotificationPrivate *priv = notification->priv;
+
+ if (priv->close_button)
+ {
+ gtk_widget_unparent (priv->close_button);
+ priv->close_button = NULL;
+ }
+
+ GTK_WIDGET_CLASS (gtk_notification_parent_class)->destroy (widget);
+}
+
+static void
gtk_notification_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
GtkNotification *notification = GTK_NOTIFICATION (object);
@@ -209,6 +224,7 @@ gtk_notification_class_init (GtkNotificationClass *klass)
object_class->set_property = gtk_notification_set_property;
object_class->get_property = gtk_notification_get_property;
+ widget_class->destroy = gtk_notification_destroy;
widget_class->get_preferred_width = gtk_notification_get_preferred_width;
widget_class->get_preferred_height_for_width = gtk_notification_get_preferred_height_for_width;
widget_class->get_preferred_height = gtk_notification_get_preferred_height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]