? bug143874-1.patch
? depcomp
? gtk-doc.make
? install-sh
? missing
Index: gtksourceview/gtksourceprintjob.c
===================================================================
RCS file: /cvs/gnome/gtksourceview/gtksourceview/gtksourceprintjob.c,v
retrieving revision 1.11
diff -u -p -r1.11 gtksourceprintjob.c
--- gtksourceview/gtksourceprintjob.c	16 Aug 2004 20:48:49 -0000	1.11
+++ gtksourceview/gtksourceprintjob.c	22 Dec 2004 01:15:13 -0000
@@ -1074,7 +1074,9 @@ get_text_simple (GtkSourcePrintJob *job,
 		
 		/* get a line of text */
 		iter = *start;
-		gtk_text_iter_forward_to_line_end (&iter);
+		if (!gtk_text_iter_ends_line (&iter))
+			gtk_text_iter_forward_to_line_end (&iter);
+		
 		if (gtk_text_iter_compare (&iter, end) > 0)
 			iter = *end;
 
@@ -1132,7 +1134,9 @@ get_text_with_style (GtkSourcePrintJob *
 
 		/* get a line of text - limit points to the end of the line */
 		limit = *start;
-		gtk_text_iter_forward_to_line_end (&limit);
+		if (!gtk_text_iter_ends_line (&limit))
+			gtk_text_iter_forward_to_line_end (&limit);
+		
 		if (gtk_text_iter_compare (&limit, end) > 0)
 			limit = *end;
 
@@ -1294,7 +1298,7 @@ create_layout_for_para (GtkSourcePrintJo
 
 	layout = pango_layout_new (job->priv->pango_context);
 	
-	if (job->priv->wrap_mode != GTK_WRAP_NONE)
+/*	if (job->priv->wrap_mode != GTK_WRAP_NONE)*/
 		pango_layout_set_width (layout, job->priv->text_width * PANGO_SCALE);
 	
 	switch (job->priv->wrap_mode)	{
@@ -1308,6 +1312,8 @@ create_layout_for_para (GtkSourcePrintJo
 		pango_layout_set_wrap (layout, PANGO_WRAP_WORD_CHAR);
 		break;
 	case GTK_WRAP_NONE:
+		/* FIXME: hack */
+		pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
 		break;
 	}
 
@@ -1317,6 +1323,20 @@ create_layout_for_para (GtkSourcePrintJo
 	pango_layout_set_text (layout, text->str, text->len);
 	pango_layout_set_attributes (layout, attrs);
 
+	/* FIXME: <horrible-hack> */
+	if (job->priv->print_numbers > 0)
+	{
+		PangoLayoutIter *iter;
+		iter = pango_layout_get_iter (layout);
+		if (pango_layout_iter_get_baseline (iter) == 0)
+		{
+			g_string_append_c (text, ' ');
+			pango_layout_set_text (layout, text->str, text->len);
+		}
+		pango_layout_iter_free (iter);
+	}
+	/* FIXME: </horrible-hack> */
+	
 	g_string_free (text, TRUE);
 	pango_attr_list_unref (attrs);
 
