Re: Dangling links in gtk-doc output



On Wed, 2002-12-11 at 23:06, Matthias Clasen wrote:
> gtk-doc produces quite a few dangling intra-document links, since it
> emits <link linkend="$symbol"> for links to an object struct named
> $symbol, but <anchor id="$symbol-struct"/> for the object documentation.
> The reasoning is that <refentry id="$symbol"> is used for the refentry
> containtaing the object, and the links are supposed to point to the top 
> of the refentry. But this is only true, if the <TITLE> line in the
> sections.txt file has not been changed from the default
> <TITLE>$symbol</TITLE> initially produced by gtk-doc. The gdk and gtk
> docs contain quite a few sections, where the titles have been changed,
> e.g.: GdkPixmap, GdkDrawable, GdkGC, GdkWindow and GdkKeymap  in gdk. 
> 
> Yesterday I committed a workaround for this problem to gdk, which
> consists of manually adding <anchor id="GdkPixmap"/>, etc in the
> templates. 
> 
> It would of course be much nicer if gtk-doc could get this right on its
> own. Here is a patch which adds the missing anchors as early as possible
> in the refentry. Ok to commit ?

Yes, those <anchor id="$symbol-struct"/> links are a bit awkward, but I
can't think of a better way to do it. I think it is better that links to
e.g. 'GtkButton' point to the top of the page, and then we have to use a
different SGML ID for the GtkButton struct.

Anyway, the patch looks OK. Make sure you try it first, though.

Damon




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