Re: Tree Iter: Text out of pango markup




On Feb 3, 2005, at 8:53 AM, Dirk van der Walt wrote:

Is there an easy way to get just the text that is displayed from the iter?
...
I've thought of filtering it out via a regexp, if all else fails.

So far as i know, that's the only way. The C code for GtkCellRendererText uses pango_parse_markup() to turn the markup in to a PangoAttrList and plain text, but this function is not bound to perl.

All you really want to do, though, is strip tags, so even pango_parse_markup() would be overkill for you. Things like $markup =~ s/<[^>]*>//g are what perl does best. :-)

--
muppet <scott at asofyet dot org>




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