Hi Diego, On Tue, Dec 05, 2006 at 12:39:17PM +0100, Diego . wrote:
Ok, but with FALSE (DwPage owns a button that owns the image) the button fail to draw the alt text when can not load the image and do not use width and height atributes of the html tag. Using your patch and seting the parameter to TRUE it use width, height and alt, but do not redraw alt text. Without your patch dillo segfaults if that parameter is true.
Diego.
Not bad for a "quick hacky patch". ;-) You can use TRUE, most probably at the expense of memory leaks and maybe some side effect too. Handling "alt text" is not trivial though. Currently the DwButton with image acts as if the only child it can have is an image (dw_button.c). Handling of "alt text" involves implementing this button to handle two childs, one for alt text and another for the image. For instance, both could be added, and the button let to chose which one to draw depending on which one is NULL at a given time. Note that the image handling is asynchronous. You don't know if it will succeed at button creation time, so the button should check both children's size (for instance), and use a successful one given preference to the image. This clearly needs careful implementation. Now, dillo-0.8.6 uses the old C/GTK1 Dw, without abstraction layer. I'd prefer to work this problem out in the new C++/FLTK2 Dw with abstraction layer. If you want to implement this in C/GTK1 Dw, the above hints should get you started. -- Cheers Jorge.-
2006/12/2, Jorge Arellano Cid <jcid@dillo.org>:
Hi Diego,
On Fri, Dec 01, 2006 at 02:23:01AM +0100, Diego . wrote:
Very thanks for the fast patch and the advices. One question ¿In Html_input_image why is the function Html_add_new_image called with the FALSE parameter?
Quick answer:
Because the image is embedded inside a button that's already inside the DwPage.
In other words: there's no need to add the image to the DwPage because the button "owns" the image (think of an object), thus only the button object needs to be added.
-- Cheers Jorge.-
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev