[valadoc] libvaladoc/html: Sort subnamespaces in navis



commit 5dbaebf86e6584b403f75e3502d68a45abc82544
Author: Florian Brosch <flo brosch gmail com>
Date:   Mon Feb 27 01:34:37 2012 +0100

    libvaladoc/html: Sort subnamespaces in navis

 src/libvaladoc/html/basicdoclet.vala |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/libvaladoc/html/basicdoclet.vala b/src/libvaladoc/html/basicdoclet.vala
index d2ab882..75a52cf 100755
--- a/src/libvaladoc/html/basicdoclet.vala
+++ b/src/libvaladoc/html/basicdoclet.vala
@@ -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);
 		}



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