[gtk/matthiasc/for-main] Use pango api better




commit 6fd53f28f3a6eb3bb9bc5947748242de826061a6
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 23 09:55:46 2022 -0500

    Use pango api better
    
    Avoid direct access to PangoLayoutLine members,
    use pango api for it where we can.#

 gtk/gtktextutil.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtktextutil.c b/gtk/gtktextutil.c
index 6570994bb2..75f081732a 100644
--- a/gtk/gtktextutil.c
+++ b/gtk/gtktextutil.c
@@ -50,7 +50,9 @@ append_n_lines (GString *str, const char *text, GSList *lines, int n_lines)
   for (i = 0; i < n_lines; i++)
     {
       line = lines->data;
-      g_string_append_len (str, &text[line->start_index], line->length);
+      g_string_append_len (str,
+                           &text[pango_layout_line_get_start_index (line)],
+                           pango_layout_line_get_length (line));
       lines = lines->next;
     }
 }


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