diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2011-08-15 08:01:43 -0400 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2011-08-15 08:01:43 -0400 |
commit | 57143d2bf01db4f9013193a2a2148b83b03c6722 (patch) | |
tree | 26b3405a84a70fb10b21cb5c6feba297cca801c0 /giscanner | |
parent | 8b9a5a1a5ce4cb0eb28b9d89129a867dda511c17 (diff) | |
download | gobject-introspection-57143d2bf01db4f9013193a2a2148b83b03c6722.tar.gz |
first pass at python backend for doc tools
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/mallardwriter.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py index 28b21af0..bf87aea7 100644 --- a/giscanner/mallardwriter.py +++ b/giscanner/mallardwriter.py @@ -261,7 +261,17 @@ class MallardFormatterC(MallardFormatter): return node.c_name class MallardFormatterPython(MallardFormatter): - pass + def get_title(self, node, parent): + if isinstance(node, ast.Namespace): + return "%s Documentation" % node.name + elif isinstance(node, ast.Function): + return "%s.%s" % (node.namespace, node.name) + elif isinstance(node, ast.Property): + return "%s" % parent.name + elif isinstance(node, ast.Signal): + return "%s" % node.name + else: + return "%s.%s" % (node.namespace, node.name) class MallardPage(object): def __init__(self, writer, node, parent): |