[Dillo-dev]Re: anchor names
Dear Sebastian, thanks for the quick bugfix. On Sun, Oct 17, 2004 at 04:32:09PM +0200, Sebastian Geerken wrote:
The changes also make the viewport check, whether anchor names are unique. If not, g_return_if_fail is called, which messages should not be printed normally (and "normally" includes faulty web pages), instead, normal HTML error messages should be shown. Probably, the best solution is to add a function a_Dw_gtk_viewport_check_anchor(), which returns, whether an anchor is already defined. If it returns TRUE, an appropriate message is shown, and the anchor is not added.
Why don't you let a_Dw_gtk_viewport_add_anchor return a result: FALSE = ok, TRUE = anchor already defined and not changed Then a_Dw_page_add_anchor could pass this on to html.c, where my patch would produce the HTML warning. Otherwise one would look up the hash table twice, once in a_Dw_gtk_viewport_check_anchor and once in a_Dw_gtk_viewport_add_anchor. All the best, -- Matthias Franz Section de Mathématiques, Université de Genève, Suisse
On Tue, Oct 19, Matthias Franz wrote:
Dear Sebastian,
thanks for the quick bugfix.
On Sun, Oct 17, 2004 at 04:32:09PM +0200, Sebastian Geerken wrote:
The changes also make the viewport check, whether anchor names are unique. If not, g_return_if_fail is called, which messages should not be printed normally (and "normally" includes faulty web pages), instead, normal HTML error messages should be shown. Probably, the best solution is to add a function a_Dw_gtk_viewport_check_anchor(), which returns, whether an anchor is already defined. If it returns TRUE, an appropriate message is shown, and the anchor is not added.
Why don't you let a_Dw_gtk_viewport_add_anchor return a result: FALSE = ok, TRUE = anchor already defined and not changed Then a_Dw_page_add_anchor could pass this on to html.c, where my patch would produce the HTML warning. Otherwise one would look up the hash table twice, once in a_Dw_gtk_viewport_check_anchor and once in a_Dw_gtk_viewport_add_anchor.
See latest commitment, something like this has been added. There are also now HTML warnings, if equal anchors have been added twice. For those, who are interested, I've attached the changes as patch. Sebastian
participants (2)
-
Matthias Franz
-
Sebastian Geerken