gtksourceview r2260 - in branches/gtksourcecompletion: . gtksourceview



Author: jessevdk
Date: Fri Apr 10 22:21:31 2009
New Revision: 2260
URL: http://svn.gnome.org/viewvc/gtksourceview?rev=2260&view=rev

Log:
	* gtksourceview/gtksourcecompletiontriggerkey.c:
	
	Implemented completion unref in dispose


Modified:
   branches/gtksourcecompletion/ChangeLog
   branches/gtksourcecompletion/gtksourceview/gtksourcecompletiontriggerkey.c

Modified: branches/gtksourcecompletion/gtksourceview/gtksourcecompletiontriggerkey.c
==============================================================================
--- branches/gtksourcecompletion/gtksourceview/gtksourcecompletiontriggerkey.c	(original)
+++ branches/gtksourcecompletion/gtksourceview/gtksourcecompletiontriggerkey.c	Fri Apr 10 22:21:31 2009
@@ -103,19 +103,35 @@
 	self = GTK_SOURCE_COMPLETION_TRIGGER_KEY (object);
 	
 	g_free (self->priv->trigger_name);
-	g_object_unref (self->priv->completion);
 
 	G_OBJECT_CLASS (gtk_source_completion_trigger_key_parent_class)->finalize (object);
 }
 
+static void
+gtk_source_completion_trigger_key_dispose (GObject *object)
+{
+	GtkSourceCompletionTriggerKey *self;
+	
+	self = GTK_SOURCE_COMPLETION_TRIGGER_KEY (object);
+	
+	if (self->priv->completion != NULL)
+	{
+		g_object_unref (self->priv->completion);
+		self->priv->completion = NULL;
+	}
+	
+	G_OBJECT_CLASS (gtk_source_completion_trigger_key_parent_class)->dispose (object);
+}
+
 static void 
 gtk_source_completion_trigger_key_class_init (GtkSourceCompletionTriggerKeyClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 	
-	g_type_class_add_private (klass, sizeof (GtkSourceCompletionTriggerKeyPrivate));
-
 	object_class->finalize = gtk_source_completion_trigger_key_finalize;
+	object_class->dispose = gtk_source_completion_trigger_key_dispose;
+
+	g_type_class_add_private (klass, sizeof (GtkSourceCompletionTriggerKeyPrivate));
 }
 
 static void 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]