[gtk/pango-line-breaker: 5/6] Use pango api better
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/pango-line-breaker: 5/6] Use pango api better
- Date: Mon, 24 Jan 2022 04:38:15 +0000 (UTC)
commit 9960be7eebd9e32900986b11ebef42c44b10fa94
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]