[valadoc] Hide namespaces without visible members



commit 77180ba05aa198e4cb9bfd8bc0050f4c5f94e86f
Author: Florian Brosch <flo brosch gmail com>
Date:   Wed May 13 00:30:22 2015 +0200

    Hide namespaces without visible members
    
    Fixes bug #744950

 src/libvaladoc/api/namespace.vala |    7 +++++++
 src/libvaladoc/api/node.vala      |    7 +++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/libvaladoc/api/namespace.vala b/src/libvaladoc/api/namespace.vala
index ff19db8..c2cba30 100644
--- a/src/libvaladoc/api/namespace.vala
+++ b/src/libvaladoc/api/namespace.vala
@@ -86,5 +86,12 @@ public class Valadoc.Api.Namespace : Symbol {
        public override void accept (Visitor visitor) {
                visitor.visit_namespace (this);
        }
+
+       /**
+        * { inheritDoc}
+        */
+       public override bool is_browsable (Settings settings) {
+               return has_visible_children (settings);
+       }
 }
 
diff --git a/src/libvaladoc/api/node.vala b/src/libvaladoc/api/node.vala
index d3ed2bd..580828f 100644
--- a/src/libvaladoc/api/node.vala
+++ b/src/libvaladoc/api/node.vala
@@ -173,6 +173,13 @@ public abstract class Valadoc.Api.Node : Item, Browsable, Documentation, Compara
        }
 
        /**
+        * Specifies whether this node has at least one visible child
+        */
+       public bool has_visible_children (Settings settings) {
+               return has_visible_children_by_types (per_type_children.keys.to_array (), settings);
+       }
+
+       /**
         * Specifies whether this node has at least one child with the given type
         *
         * @param type a node type


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