GNOME Bugzilla – Bug 676685
Allow to order functions without using $MODULE-sections.txt
Last modified: 2012-05-24 17:57:27 UTC
Currently, it's possible to generate a documentation without writing the sections.txt file using the one automatically generated by gtkdoc-scan. But it is not possible to define the order of the functions. They are in alphabetical order which is often not the best one. It would be better if they can use by example the order of the declarations in the header file.
This must be a recent change, they used to be ordered the same way as in the header -- which *is* already a method how to define the order. I would really appreciate having for instance the corresponding setter and getter next to each other in the documentation (as they are in the headers). I hope I will not have to write a script for parsing the headers and reordering the section file accordingly to get the native order again...
The sorting is done in gtkdoc-scan.in: # sort the symbols $list=join("\n",sort(split("\n",$list)))."\n"; and was added in this change commit 84b58c06e1214c984f12af4067b6520d16707fe1 Author: Stefan Kost <ensonic@users.sf.net> Date: Thu Aug 25 19:45:26 2011 +0200 scan: make the generated section file more deterministic Sort the section and the symbols with the section. The idea was to make the generated files more stable. Although it'd probably work to only sort the sections as such, but not the content.
commit 2a6b01253fe41412172a60f26705114b953d0a95 Author: Stefan Sauer <ensonic@users.sf.net> Date: Wed May 23 23:10:01 2012 +0200 gtkdoc-scan: revert the sorting of symbols Developers can arrange symbols by shuffling them inside the header file. Fixes #676685.
Thank you, that's a really fast fix.