Index: gtksourceview/gtksourcebuffer.c
===================================================================
RCS file: /cvs/gnome/gtksourceview/gtksourceview/gtksourcebuffer.c,v
retrieving revision 1.39.6.1
diff -u -p -r1.39.6.1 gtksourcebuffer.c
--- gtksourceview/gtksourcebuffer.c	6 Nov 2005 11:59:55 -0000	1.39.6.1
+++ gtksourceview/gtksourcebuffer.c	6 Nov 2005 16:29:48 -0000
@@ -82,6 +82,8 @@ enum {
 	CAN_REDO,
 	HIGHLIGHT_UPDATED,
 	MARKER_UPDATED,
+	FOLD_ADDED,
+	FOLD_REMOVED,
 	LAST_SIGNAL
 };
 
@@ -367,6 +369,28 @@ gtk_source_buffer_class_init (GtkSourceB
 			  G_TYPE_NONE, 
 			  1, 
 			  GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+	buffer_signals[FOLD_ADDED] =
+	    g_signal_new ("fold_added",
+			  G_OBJECT_CLASS_TYPE (object_class),
+			  G_SIGNAL_RUN_LAST,
+			  G_STRUCT_OFFSET (GtkSourceBufferClass, fold_added),
+			  NULL, NULL,
+			  gtksourceview_marshal_VOID__BOXED,
+			  G_TYPE_NONE, 
+			  1, 
+			  GTK_TYPE_SOURCE_FOLD | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+	buffer_signals[FOLD_ADDED] =
+	    g_signal_new ("fold_removed",
+			  G_OBJECT_CLASS_TYPE (object_class),
+			  G_SIGNAL_RUN_LAST,
+			  G_STRUCT_OFFSET (GtkSourceBufferClass, fold_removed),
+			  NULL, NULL,
+			  gtksourceview_marshal_VOID__BOXED,
+			  G_TYPE_NONE, 
+			  1, 
+			  GTK_TYPE_SOURCE_FOLD | G_SIGNAL_TYPE_STATIC_SCOPE);
 }
 
 static void
@@ -4048,6 +4072,8 @@ gtk_source_buffer_add_fold (GtkSourceBuf
 			g_list_append (last_fold, fold);
 	}
 	
+	g_signal_emit (G_OBJECT (buffer), buffer_signals [FOLD_ADDED], 0, fold);
+	
 	return fold;
 }
 
@@ -4078,7 +4104,9 @@ gtk_source_buffer_remove_fold (GtkSource
 	buffer->priv->folds = g_list_delete_link (buffer->priv->folds, l);
 	
 	g_list_foreach (fold->children, foreach_fold_region, buffer);
-	
+
+	g_signal_emit (G_OBJECT (buffer), buffer_signals [FOLD_REMOVED], 0, fold);
+
 	gtk_source_fold_free (fold);
 }
 
Index: gtksourceview/gtksourcebuffer.h
===================================================================
RCS file: /cvs/gnome/gtksourceview/gtksourceview/gtksourcebuffer.h,v
retrieving revision 1.18.14.1
diff -u -p -r1.18.14.1 gtksourcebuffer.h
--- gtksourceview/gtksourcebuffer.h	6 Nov 2005 11:59:55 -0000	1.18.14.1
+++ gtksourceview/gtksourcebuffer.h	6 Nov 2005 16:29:48 -0000
@@ -50,6 +50,8 @@ struct _GtkSourceBuffer 
 	GtkSourceBufferPrivate *priv;
 };
 
+#include <gtksourceview/gtksourcefold.h>
+
 struct _GtkSourceBufferClass 
 {
 	GtkTextBufferClass parent_class;
@@ -63,6 +65,10 @@ struct _GtkSourceBufferClass 
 					 GtkTextIter     *end);
 	void (* marker_updated)         (GtkSourceBuffer *buffer,
 					 GtkTextIter     *where);
+	void (* fold_added)		(GtkSourceBuffer *buffer,
+					 GtkSourceFold   *fold);
+	void (* fold_removed)		(GtkSourceBuffer *buffer,
+					 GtkSourceFold   *fold);
 
 	/* Padding for future expansion */
 	void (*_gtk_source_reserved1) 	(void);
@@ -70,7 +76,6 @@ struct _GtkSourceBufferClass 
 	void (*_gtk_source_reserved3) 	(void);
 };
 
-#include <gtksourceview/gtksourcefold.h>
 #include <gtksourceview/gtksourcemarker.h>
 
 GType           	 gtk_source_buffer_get_type 		(void) G_GNUC_CONST;
