]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Html: Sort members in the navigation
authorDidier "Ptitjes <ptitjes@free.fr>
Tue, 20 Oct 2009 11:55:42 +0000 (13:55 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Tue, 20 Oct 2009 11:55:42 +0000 (13:55 +0200)
src/doclets/htmlhelpers/doclet/Makefile.am [changed mode: 0644->0755]
src/doclets/htmlhelpers/doclet/doclet.vala
src/doclets/htmlhelpers/doclet/markupwriter.vala [changed mode: 0644->0755]
src/libvaladoc/api/node.vala
src/libvaladoc/api/tree.vala

old mode 100644 (file)
new mode 100755 (executable)
index 83dc35cea3a241bb0235d9f7696033e3e8353eba..7c1519a30970e0a5fda207908bcd7b6b6e1caca3 100755 (executable)
@@ -216,7 +216,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
        }
 
        protected void write_navi_children (Api.Node node, Api.NodeType type, Api.Node? parent) {
-               foreach (Api.Node child in node.get_children_by_type (type)) {
+               var children = node.get_children_by_type (type);
+               children.sort ();
+               foreach (Api.Node child in children) {
                        write_navi_entry (child, parent, get_html_css_class (child), child != parent);
                }
        }
index 13466b7bea4bcc915f7998ff68a946c46eeaa423..962c494f027e7b7055488662701d50ea720026c4 100644 (file)
@@ -46,7 +46,7 @@ public enum Valadoc.Api.NodeType {
        TYPE_PARAMETER
 }
 
-public abstract class Valadoc.Api.Node : Item, Visitable, Documentation {
+public abstract class Valadoc.Api.Node : Item, Visitable, Documentation, Comparable<Node> {
        private bool do_document = false;
 
        public abstract string? name { owned get; }
@@ -134,7 +134,7 @@ public abstract class Valadoc.Api.Node : Item, Visitable, Documentation {
                        }
                }
 
-               return children.read_only_view;
+               return children;
        }
 
        public void accept_children_by_type (NodeType type, Visitor visitor) {
@@ -233,5 +233,9 @@ public abstract class Valadoc.Api.Node : Item, Visitable, Documentation {
                }
                return this._full_name;
        }
+
+       public int compare_to (Node node) {
+               return strcmp (name, node.name);
+       }
 }
 
index c545a911e3db6d70642785cbffc170e2733e7019..868f11034f1c02855dea836c762a6f23db7d56f5 100644 (file)
@@ -114,7 +114,7 @@ public class Valadoc.Api.Tree {
                this.context.checking = settings.enable_checking;
                this.context.deprecated = settings.deprecated;
                this.context.experimental = settings.experimental;
-               this.context.non_null_experimental = settings.non_null_experimental;
+//             this.context.non_null_experimental = settings.non_null_experimental;
                this.context.dbus_transformation = !settings.disable_dbus_transformation;
 
 
@@ -292,14 +292,14 @@ public class Valadoc.Api.Tree {
                        return false;
                }
 
-               if (context.non_null_experimental) {
-                       Vala.NullChecker null_checker = new Vala.NullChecker ();
-                       null_checker.check (this.context);
+//             if (context.non_null_experimental) {
+//                     Vala.NullChecker null_checker = new Vala.NullChecker ();
+//                     null_checker.check (this.context);
 
-                       if (this.context.report.get_errors () > 0) {
-                               return false;
-                       }
-               }
+//                     if (this.context.report.get_errors () > 0) {
+//                             return false;
+//                     }
+//             }
 
                Api.NodeBuilder builder = new NodeBuilder (this);
                this.context.accept(builder);