summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorLaszlo Pandy <lpandy@src.gnome.org>2011-08-16 20:01:39 +0200
committerLaszlo Pandy <lpandy@src.gnome.org>2011-08-16 20:01:39 +0200
commit0dd672511d249d74ac58a7a6e99fdbdd0b0bd90f (patch)
tree0eb3eb06a82511937e721a08dacd446ee9427f7f /giscanner
parentcfeb773b072259e720150559f29ffbd26bb70874 (diff)
downloadgobject-introspection-0dd672511d249d74ac58a7a6e99fdbdd0b0bd90f.tar.gz
For docbook, make the id attributes the same regardless of language. Only user visible strings should change between C and Python.
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/docbookwriter.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/giscanner/docbookwriter.py b/giscanner/docbookwriter.py
index 182b513d..7cc6d89d 100644
--- a/giscanner/docbookwriter.py
+++ b/giscanner/docbookwriter.py
@@ -105,7 +105,10 @@ class DocBookFormatter(object):
return "%s ()" % method.symbol
def get_page_name(self, node):
- pass
+ # page name is only used for xml:id (not displayed to users)
+ if isinstance(node, ast.Alias) or node.gtype_name is None:
+ return node.ctype
+ return node.gtype_name
def get_class_name(self, node):
if node.gtype_name is None:
@@ -259,11 +262,8 @@ class DocBookFormatter(object):
class DocBookFormatterPython(DocBookFormatter):
- def get_page_name(self, node):
- return node.name
-
def get_title(self, page):
- return "%s.%s" % (page.ast.namespace.name, page.name)
+ return "%s.%s" % (page.ast.namespace.name, page.ast.name)
def render_struct(self, page):
class_ = page.ast
@@ -290,11 +290,6 @@ class DocBookFormatterPython(DocBookFormatter):
class DocBookFormatterC(DocBookFormatter):
- def get_page_name(self, node):
- if isinstance(node, ast.Alias) or node.gtype_name is None:
- return node.ctype
- return node.gtype_name
-
def get_title(self, page):
return page.ast.ctype