]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc/html: Sort subnamespaces in navis
authorFlorian Brosch <flo.brosch@gmail.com>
Mon, 27 Feb 2012 00:34:37 +0000 (01:34 +0100)
committerFlorian Brosch <flo.brosch@gmail.com>
Mon, 27 Feb 2012 00:34:37 +0000 (01:34 +0100)
src/libvaladoc/html/basicdoclet.vala

index d2ab882ee958eb94a2b1a971f5a805e504589966..75a52cfef473d25257d53e6863fd74e3e3587fac 100755 (executable)
@@ -257,7 +257,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
        }
 
        protected void fetch_subnamespace_names (Api.Node node, Gee.ArrayList<Namespace> namespaces) {
-               foreach (Api.Node child in node.get_children_by_type (Api.NodeType.NAMESPACE)) {
+               Gee.ArrayList<Api.Node> sorted_list = new Gee.ArrayList<Api.Node> ();
+               sorted_list.add_all (node.get_children_by_type (Api.NodeType.NAMESPACE));
+               sorted_list.sort ();
+
+               foreach (Api.Node child in sorted_list) {
                        namespaces.add ((Namespace) child);
                        this.fetch_subnamespace_names (child, namespaces);
                }