[Xfce4-commits] <mousepad:master> Fix compilation with pango.

Nick Schermer noreply at xfce.org
Sat May 5 21:31:21 CEST 2012


Updating branch refs/heads/master
         to c5c4bd8a3f8c8a0ce94e806e027d68dac540cec0 (commit)
       from 375a246bf9f38733f368bfa05163734119b54168 (commit)

commit c5c4bd8a3f8c8a0ce94e806e027d68dac540cec0
Author: Nick Schermer <nick at xfce.org>
Date:   Wed Feb 10 12:59:50 2010 +0100

    Fix compilation with pango.

 mousepad/mousepad-print.c |   14 +++++++++++++-
 po/POTFILES.in            |    1 +
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/mousepad/mousepad-print.c b/mousepad/mousepad-print.c
index 04aa284..c2ae215 100644
--- a/mousepad/mousepad-print.c
+++ b/mousepad/mousepad-print.c
@@ -445,7 +445,11 @@ mousepad_print_begin_print (GtkPrintOperation *operation,
   for (i = 0; i < pango_layout_get_line_count (print->layout); i++)
     {
       /* get the line */
+#if PANGO_VERSION_CHECK (1, 16, 0)
       line = pango_layout_get_line_readonly (print->layout, i);
+#else
+      line = pango_layout_get_line (print->layout, i);
+#endif
 
       /* if we don't wrap lines, skip the lines that don't start a paragraph */
       if (print->text_wrapping == FALSE && line->is_paragraph_start == FALSE)
@@ -559,7 +563,11 @@ mousepad_print_draw_page (GtkPrintOperation *operation,
   for (i = start, y = print->y_offset; i < end; i++)
     {
       /* get the line */
+#if PANGO_VERSION_CHECK (1, 16, 0)
       line = pango_layout_get_line_readonly (print->layout, i);
+#else
+      line = pango_layout_get_line (print->layout, i);
+#endif
 
       /* if we don't wrap lines, skip the lines that don't start a paragraph */
       if (print->text_wrapping == FALSE && line->is_paragraph_start == FALSE)
@@ -596,7 +604,11 @@ mousepad_print_draw_page (GtkPrintOperation *operation,
           cairo_move_to (cr, 0, y);
 
           /* pick the first line and draw it on the cairo context */
-          line = pango_layout_get_line_readonly (layout, 0);
+#if PANGO_VERSION_CHECK (1, 16, 0)
+          line = pango_layout_get_line_readonly (print->layout, 0);
+#else
+          line = pango_layout_get_line (print->layout, 0);
+#endif
           pango_cairo_show_layout_line (cr, line);
         }
     }
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 022d836..a62d797 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -7,6 +7,7 @@ mousepad/mousepad-dbus.c
 mousepad/mousepad-dialogs.c
 mousepad/mousepad-document.c
 mousepad/mousepad-encoding-dialog.c
+mousepad/mousepad-encoding.c
 mousepad/mousepad-file.c
 mousepad/mousepad-preferences.c
 mousepad/mousepad-print.c


More information about the Xfce4-commits mailing list