summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2013-12-03 19:07:09 +0100
committerCarlos Garcia Campos <carlosgc@gnome.org>2013-12-03 19:07:09 +0100
commit2c4320c26744ea28be10eac7cc54980c9eb4fc27 (patch)
treec4e7813553636c12b3f9444d1bbf8c6f40d95ce3 /glib
parent98d75dcdb9b73feb6f35d8ad76f5d0c428289f91 (diff)
glib-demo: Show number of charcters and text layout units in text demo
It helps to easily detect the cases where these values mismatch.
Diffstat (limited to 'glib')
-rw-r--r--glib/demo/text.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/glib/demo/text.c b/glib/demo/text.c
index 82293d5a..8af3ce32 100644
--- a/glib/demo/text.c
+++ b/glib/demo/text.c
@@ -123,8 +123,8 @@ pgd_text_get_text (GtkWidget *button,
demo->text_attrs = poppler_page_get_text_attributes_for_area (page, &demo->area);
g_timer_stop (timer);
- str = g_strdup_printf ("<i>got text in %.4f seconds, text layout in %.4f seconds, text attrs in %.4f seconds</i>",
- text_elapsed, layout_elapsed, g_timer_elapsed (timer, NULL));
+ str = g_strdup_printf ("<i>got %ld chars in %.4f seconds, %u layout units in %.4f seconds, text attrs in %.4f seconds</i>",
+ g_utf8_strlen(text, -1), text_elapsed, n_recs, layout_elapsed, g_timer_elapsed (timer, NULL));
gtk_label_set_markup (GTK_LABEL (demo->timer_label), str);
g_free (str);
} else {