I need to break some generic text into multiple lines using a GtkCellRendererText. If the text exceeds 3 lines, I would like to ellipsize it.
So here is my attempt, which does not work so well.
...
g_object_set (G_OBJECT (my_text_renderer),
"ellipsize", PANGO_ELLIPSIZE_END,
"single-paragraph-mode", TRUE,
"wrap-mode", PANGO_WRAP_WORD_CHAR,
"wrap-width", 30,
"width-chars", 40,
"xpad", 5,
NULL);
It works fine if I only use "ellipsize", and it works fine if I only use "wrap-width" ... but both together seems to be a problem.
I found this tutorial which suggest to use "gtk_label_set_lines", however I cannot do this, since I dont use a label.