[gobject-introspection] For docbook, make the id attributes the same regardless of language. Only user visible strings shoul
- From: Laszlo Pandy <lpandy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] For docbook, make the id attributes the same regardless of language. Only user visible strings shoul
- Date: Tue, 16 Aug 2011 18:07:20 +0000 (UTC)
commit 0dd672511d249d74ac58a7a6e99fdbdd0b0bd90f
Author: Laszlo Pandy <lpandy src gnome org>
Date: Tue Aug 16 20:01:39 2011 +0200
For docbook, make the id attributes the same regardless of language. Only user visible strings should change between C and Python.
giscanner/docbookwriter.py | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/giscanner/docbookwriter.py b/giscanner/docbookwriter.py
index 182b513..7cc6d89 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]