Re: GtkText + underline (partial patch)




nirva@ishiboo.com (Danny Dulai) writes:

> So the new GtkText replacement is taking a bit too long to come to life, so
> I decided to add underlining to the existing text widget (even if it is
> going away in the future, this functionality is needed by many people, in
> the present).
> 
> So I started the patch, but I'm a little confused on how to continue. This
> is against 1.2.6 tarball from the ftp sites.
> 

No feature addition patches to the current GtkText are being taken at this
time ... its not really a maintainable code base, and will be replaced in
GTK+-1.4. (I say that with confidence now that we have a nice candidate
in Havoc's widget; which in fact already does underlineing.) 

If you want something on a closer timescale, you might want to submit
your patch to Mikael Hermansson as a patch to his GtkExText widget.
He's taken GtkText and is actively working on developing and extending
it.

Regards,
                                        Owen

[...]

> Basically, I've added a gboolean to the TextProperty structure which lets
> you know if the chunk of text is to be underlined or not, and I've fixed up
> all the code (I think) that messes with TextProperty's and that inserts new
> text. I have the underlining code done too (at very end of patch). The only
> part I'm missing is how you decide in draw_line() if the text you are
> drawing with gdk_draw_text() is to be underlined or not. I can find no
> TextProperty that function has access, and I'm a little confused by the
> LineParams stuff. Could someone give me a hint on how to connect the final
> underlining to the Textproperty the text belongs to?



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