[gi-docgen/ebassi/issue-106: 2/3] generate: Only check for properties and signals in the same namespace




commit ece74fe85f39fc8d20c1c3cf4433e7586966e6db
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Aug 31 22:36:29 2021 +0100

    generate: Only check for properties and signals in the same namespace
    
    We currently don't generate links and sections for ancestors and
    interfaces in dependent namespaces.

 gidocgen/gdgenerate.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gidocgen/gdgenerate.py b/gidocgen/gdgenerate.py
index e1a0b97..6821eab 100644
--- a/gidocgen/gdgenerate.py
+++ b/gidocgen/gdgenerate.py
@@ -1277,10 +1277,10 @@ class TemplateClass:
         if len(self.properties) > 0:
             return True
         for ancestor in self.ancestors:
-            if ancestor["n_properties"] > 0:
+            if ancestor["namespace"] == self.namespace and ancestor["n_properties"] > 0:
                 return True
         for iface in self.interfaces:
-            if iface["n_properties"] > 0:
+            if iface["namespace"] == self.namespace and iface["n_properties"] > 0:
                 return True
         return False
 
@@ -1289,10 +1289,10 @@ class TemplateClass:
         if len(self.signals) > 0:
             return True
         for ancestor in self.ancestors:
-            if ancestor["n_signals"] > 0:
+            if ancestor["namespace"] == self.namespace and ancestor["n_signals"] > 0:
                 return True
         for iface in self.interfaces:
-            if iface["n_signals"] > 0:
+            if iface["namespace"] == self.namespace and iface["n_signals"] > 0:
                 return True
         return False
 


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