Only in .: .deps
Only in ./gnu-regex: .deps
Only in ./gnu-regex: Makefile
Only in .: gtksourcebuffer.lo
Only in .: gtksourceiter.lo
Only in .: gtksourcelanguage.lo
Only in .: gtksourcelanguagesmanager.lo
Only in .: gtksourcemarker.lo
Only in .: gtksourceprintjob.lo
Only in .: gtksourceregex.lo
Only in .: gtksourcestylescheme.lo
Only in .: gtksourcetag.lo
Only in .: gtksourcetagtable.lo
Only in .: gtksourceundomanager.lo
diff -rup ../../../downloads/gtksourceview-1.6.1/gtksourceview/gtksourceview.c ./gtksourceview.c
--- ../../../downloads/gtksourceview-1.6.1/gtksourceview/gtksourceview.c	2006-04-08 12:07:10.000000000 +0200
+++ ./gtksourceview.c	2006-07-28 14:28:53.000000000 +0200
@@ -87,7 +87,8 @@ enum {
 	PROP_SHOW_MARGIN,
 	PROP_MARGIN,
 	PROP_SMART_HOME_END,
-	PROP_HIGHLIGHT_CURRENT_LINE
+	PROP_HIGHLIGHT_CURRENT_LINE,
+  PROP_SHOW_BLOCK
 };
 
 struct _GtkSourceViewPrivate
@@ -102,6 +103,7 @@ struct _GtkSourceViewPrivate
 	guint		 margin;
 	gint             cached_margin_width;
 	gboolean	 smart_home_end;
+	gboolean   show_block;
 	
 	GHashTable 	*pixmap_cache;
 
@@ -281,6 +283,14 @@ gtk_source_view_class_init (GtkSourceVie
 							       G_PARAM_READWRITE));
 
 	g_object_class_install_property (object_class,
+					 PROP_SHOW_BLOCK,
+					 g_param_spec_boolean ("show_block",
+							       _("Show block's extents"),
+							       _("Whether to show blocks extents"),
+							       TRUE,
+							       G_PARAM_READWRITE));
+
+	g_object_class_install_property (object_class,
 					 PROP_HIGHLIGHT_CURRENT_LINE,
 					 g_param_spec_boolean ("highlight_current_line",
 							       _("Highlight current line"),
@@ -467,6 +477,11 @@ gtk_source_view_set_property (GObject   
 							    g_value_get_boolean (value));
 			break;
 
+		case PROP_SHOW_BLOCK:
+			gtk_source_view_set_show_block(view,
+							    g_value_get_boolean (value));
+			break;
+
 		case PROP_HIGHLIGHT_CURRENT_LINE:
 			gtk_source_view_set_highlight_current_line (view,
 								    g_value_get_boolean (value));
@@ -538,6 +553,11 @@ gtk_source_view_get_property (GObject   
 					     gtk_source_view_get_smart_home_end (view));
 			break;
 			
+		case PROP_SHOW_BLOCK:
+			g_value_set_boolean (value,
+					     gtk_source_view_get_show_block (view));
+			break;
+
 		case PROP_HIGHLIGHT_CURRENT_LINE:
 			g_value_set_boolean (value,
 					     gtk_source_view_get_highlight_current_line (view));
@@ -559,6 +579,7 @@ gtk_source_view_init (GtkSourceView *vie
 	view->priv->margin = DEFAULT_MARGIN;
 	view->priv->cached_margin_width = -1;
 	view->priv->smart_home_end = TRUE;
+	view->priv->show_block = TRUE;
 	
 	view->priv->pixmap_cache = g_hash_table_new_full (g_str_hash, g_str_equal,
 							  (GDestroyNotify) g_free,
@@ -1075,6 +1096,10 @@ gtk_source_view_paint_margin (GtkSourceV
 	gint i;
 	GtkTextIter cur;
 	gint cur_line;
+	gint bracket_x;
+	gint bracket1_y;
+	gint bracket2_y;
+	gint line_height;
 
 	text_view = GTK_TEXT_VIEW (view);
 
@@ -1203,6 +1228,9 @@ gtk_source_view_paint_margin (GtkSourceV
 
 	cur_line = gtk_text_iter_get_line (&cur) + 1;
 	
+	bracket1_y = -1;
+	bracket2_y = -1;
+	
 	while (i < count) 
 	{
 		gint pos;
@@ -1235,6 +1263,70 @@ gtk_source_view_paint_margin (GtkSourceV
 				pango_layout_set_markup (layout, str, -1);
 			}
 
+			if (view->priv->show_block)
+			{
+				if (gtk_source_iter_find_matching_bracket(&cur))
+				{
+					if (bracket1_y == -1)
+						gtk_text_view_get_line_yrange (GTK_TEXT_VIEW(view), &cur, &bracket1_y, &line_height);
+					else 
+						gtk_text_view_get_line_yrange (GTK_TEXT_VIEW(view), &cur, &bracket2_y, &line_height);
+				}	
+
+				if (bracket1_y != -1 && bracket2_y != -1 && bracket1_y != bracket2_y)
+				{
+					gtk_text_view_buffer_to_window_coords (GTK_TEXT_VIEW(view),
+				  		     GTK_TEXT_WINDOW_LEFT,
+			    	  		 0,
+						       bracket1_y,
+					  	     NULL,
+					    	   &bracket1_y);
+					gtk_text_view_buffer_to_window_coords (GTK_TEXT_VIEW(view),
+						       GTK_TEXT_WINDOW_LEFT,
+				    		   0,
+				 			     bracket2_y,
+						       NULL,
+			    			   &bracket2_y);
+
+				bracket1_y += line_height / 2;
+				bracket2_y += line_height / 2;
+				bracket_x = x_pixmap + 2;
+
+				gtk_paint_vline(GTK_WIDGET (view)->style,
+						  win,
+						  GTK_WIDGET_STATE (view),
+					  	NULL,
+						  GTK_WIDGET (view),
+						  NULL,
+							bracket1_y,
+							bracket2_y,
+							bracket_x);
+	
+				gtk_paint_hline(GTK_WIDGET (view)->style,
+						  win,
+						  GTK_WIDGET_STATE (view),
+						  NULL,
+					  	GTK_WIDGET (view),
+					  	NULL,
+							bracket_x,
+							bracket_x + 8,
+							bracket1_y);
+
+				gtk_paint_hline(GTK_WIDGET (view)->style,
+						  win,
+						  GTK_WIDGET_STATE (view),
+						  NULL,
+						  GTK_WIDGET (view),
+						  NULL,
+							bracket_x,
+							bracket_x + 8,
+							bracket2_y);
+			
+				bracket1_y = -1;
+				bracket2_y = -1;
+			}	
+		}
+
 			gtk_paint_layout (GTK_WIDGET (view)->style,
 					  win,
 					  GTK_WIDGET_STATE (view),
@@ -2422,8 +2514,7 @@ gtk_source_view_set_smart_home_end (GtkS
  *
  * Return value: %TRUE if smart behavior for HOME and END keys is enabled.
  **/
-gboolean
-gtk_source_view_get_smart_home_end (GtkSourceView *view)
+gboolean gtk_source_view_get_smart_home_end (GtkSourceView *view)
 {
 	g_return_val_if_fail (GTK_IS_SOURCE_VIEW (view), FALSE);
 
@@ -2431,6 +2522,41 @@ gtk_source_view_get_smart_home_end (GtkS
 }
 
 /**
+ * gtk_source_view_set_show_block:
+ * @view: a #GtkSourceView.
+ * @enable: whether to show block's extents (lines between a
+ *          matching pair of brackets).
+ **/
+void gtk_source_view_set_show_block	(GtkSourceView *view, gboolean enable)
+{
+	g_return_if_fail (GTK_IS_SOURCE_VIEW (view));
+
+	enable = (enable != FALSE);
+
+	if (view->priv->show_block == enable)
+		return;
+
+	view->priv->show_block = enable;
+
+	g_object_notify (G_OBJECT (view), "show_block");
+}
+
+/**
+ * gtk_source_view_get_show_block:
+ * @view: a #GtkSourceView.
+ *
+ * Returns whether block's extents are shown
+ *
+ * Return value: %TRUE if block's extends are shown
+ **/
+gboolean gtk_source_view_get_show_block	(GtkSourceView *view)
+{
+	g_return_val_if_fail (GTK_IS_SOURCE_VIEW (view), FALSE);
+
+	return view->priv->show_block;
+}
+
+/**
  * gtk_source_view_style_set:
  * @widget: a #GtkSourceView.
  * @previous_style:
Only in .: gtksourceview.c~
diff -rup ../../../downloads/gtksourceview-1.6.1/gtksourceview/gtksourceview.h ./gtksourceview.h
--- ../../../downloads/gtksourceview-1.6.1/gtksourceview/gtksourceview.h	2005-01-08 23:02:30.000000000 +0100
+++ ./gtksourceview.h	2006-07-28 12:47:30.000000000 +0200
@@ -118,5 +118,9 @@ void		 gtk_source_view_set_smart_home_en
 							 gboolean         enable);
 gboolean	 gtk_source_view_get_smart_home_end	(GtkSourceView   *view);
 
+void		 gtk_source_view_set_show_block	(GtkSourceView   *view,
+							 gboolean         enable);
+gboolean	 gtk_source_view_get_show_block	(GtkSourceView   *view);
+
 G_END_DECLS
 #endif				/* end of SOURCE_VIEW_H__ */
Only in .: gtksourceview.h~
Only in .: gtksourceview-i18n.lo
Only in .: gtksourceview.lo
Only in .: gtksourceview-marshal.lo
Only in .: gtksourceview-typebuiltins.lo
Only in .: gtktextregion.lo
Only in ./language-specs: Makefile
Only in .: libgtksourceview-1.0.la
Only in .: .libs
Only in .: Makefile
Only in .: showblock.patch
