]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Hide namespaces without visible members
authorFlorian Brosch <flo.brosch@gmail.com>
Tue, 12 May 2015 22:30:22 +0000 (00:30 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Sun, 10 Jan 2016 20:55:25 +0000 (21:55 +0100)
Fixes bug #744950

src/libvaladoc/api/namespace.vala
src/libvaladoc/api/node.vala

index ff19db8ca193b0d76c0e0d6997e444f0cc801533..c2cba30d4ea4ff6ec73d269d0983ffb1d5a83c90 100644 (file)
@@ -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);
+       }
 }
 
index d3ed2bdd49521f71abb76d9d8a8dd24609327848..580828ff6bf12821edb735b2baa55f2112b63a42 100644 (file)
@@ -172,6 +172,13 @@ public abstract class Valadoc.Api.Node : Item, Browsable, Documentation, Compara
                return false;
        }
 
+       /**
+        * 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
         *