[gobject-introspection] [doctool] use different templates for method vs. function output



commit 45fd6f6af66e770b6205a65de11982efa5e2cca0
Author: John (J5) Palmieri <johnp redhat com>
Date:   Mon Aug 15 10:19:41 2011 -0400

    [doctool] use different templates for method vs. function output

 giscanner/mallardwriter.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index d24786d..3c4d6c9 100644
--- a/giscanner/mallardwriter.py
+++ b/giscanner/mallardwriter.py
@@ -265,7 +265,10 @@ class MallardFormatterPython(MallardFormatter):
         if isinstance(node, ast.Namespace):
             return "%s Documentation" % node.name
         elif isinstance(node, ast.Function):
-            return "%s.%s.%s" % (node.namespace.name, parent.name, node.name)
+            if node.is_method:
+                return "%s.%s.%s" % (node.namespace.name, parent.name, node.name)
+            else:
+                return "%s.%s" % (node.namespace.name, node.name)
         elif isinstance(node, ast.Property):
             return "%s" % node.name
         elif isinstance(node, ast.Signal):



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