After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 599514 - sane support for per-page images
sane support for per-page images
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: 1.14
Assigned To: Allison Karlitskaya (desrt)
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2009-10-24 22:20 UTC by Allison Karlitskaya (desrt)
Modified: 2010-01-21 20:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] add '@Image' attribute to sections (5.45 KB, patch)
2009-10-24 23:11 UTC, Allison Karlitskaya (desrt)
none Details | Review
sdf (8.59 KB, patch)
2010-01-21 20:33 UTC, Allison Karlitskaya (desrt)
accepted-commit_now Details | Review
forgot the png (13.99 KB, patch)
2010-01-21 20:35 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2009-10-24 22:20:18 UTC
gtk-doc currently contains some extremely hacktastic code to put an image on each page of the Gtk documentation.  it does this by doing a sort of 'reverse lookup' against the page, as it appears in the widget gallery, and determining what image was used for it there.

so for example, if i am wondering what image belongs in the top corner of the GtkTreeView.html page, i look at the visual_index.xml and see:

  <link linkend="GtkTreeView">
    <inlinegraphic fileref="list-and-tree.png" format="PNG"></inlinegraphic>
  </link>

and i know what to use.

it would make an awful lot more sense if it were possible to directly specify an image filename to use for each section in the documentation.  i guess it would probably be very easy to add support for this to the XSL.  maybe then gtk could even auto-generate its gallery page from this information.

more to the point: it would allow you to have documentation images without requiring you to have an image gallery.
Comment 1 Allison Karlitskaya (desrt) 2009-10-24 23:11:15 UTC
Created attachment 146189 [details] [review]
[PATCH] add '@Image' attribute to sections
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2009-12-07 22:01:56 UTC
Review of attachment 146189 [details] [review]:

phew, patch still applies. One minor nitpick below. It would be also great if you could add an example to tests/gobject and update the docs (help/manual/C/gtk-doc-manual.xml). I'll promisse then to apply this promptly. Thanks.

::: gtkdoc-mkdb.in
@@ +2013,3 @@
+      $image =~ s/^\s*//;
+      $image =~ s/\s*$//;
+      $image = "  <inlinegraphic fileref=\"$image\" format=\"PNG\"/>\n"

could you parse the format from the extension (png,jpeg/jpg) ?
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2009-12-18 07:53:46 UTC
I also got syntax error in gtkdoc-mktmpl (regarding an undefine var $images). Lets fixe those and then I try to have a 1.13 in a shorter cycle :)
Comment 4 Allison Karlitskaya (desrt) 2010-01-21 20:33:01 UTC
Created attachment 151964 [details] [review]
sdf
Comment 5 Allison Karlitskaya (desrt) 2010-01-21 20:35:51 UTC
Created attachment 151966 [details] [review]
forgot the png
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2010-01-21 20:38:26 UTC
Review of attachment 151964 [details] [review]:

::: tests/gobject/docs/tester.types
@@ +3,2 @@
 gtkdoc_iface_get_type
+gtkdoc_object_get_type

this files does not belong to the patch