[gobject-introspection/mallard-templates] g-ir-doc-tool: Move constructor example to follow the class doc body
- From: Tomeu Vizoso <tomeuv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/mallard-templates] g-ir-doc-tool: Move constructor example to follow the class doc body
- Date: Mon, 20 Feb 2012 12:45:34 +0000 (UTC)
commit 8c7e27b90ceb176d463399735220df806ee7f35f
Author: Tomeu Vizoso <tomeu vizoso collabora com>
Date: Mon Feb 20 13:44:00 2012 +0100
g-ir-doc-tool: Move constructor example to follow the class doc body
giscanner/mallard-Python-class.tmpl | 27 +++++++++++---------
.../GIRepository.Repository.page | 9 ++++--
2 files changed, 21 insertions(+), 15 deletions(-)
---
diff --git a/giscanner/mallard-Python-class.tmpl b/giscanner/mallard-Python-class.tmpl
index 5437fcd..489a429 100644
--- a/giscanner/mallard-Python-class.tmpl
+++ b/giscanner/mallard-Python-class.tmpl
@@ -10,19 +10,10 @@
</info>
<title>${namespace.name}.${node.name}</title>
${formatter.format(node.doc)}
-% if node.version:
-<p>Since ${node.version}</p>
-% endif
- <synopsis ui:expanded="no">
- <title>Hierarchy</title>
- <tree>
- <item>
- <code>GObject.Object</code>
- </item>
- </tree>
- </synopsis>
- <p>Constructor</p>
+
<synopsis><code>
+from gi.repository import ${namespace.name}
+
${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}(\
% for property_, ix in zip(node.properties, range(len(node.properties))):
% if property_.construct or property_.construct_only or property_.writable:
@@ -34,6 +25,18 @@ ${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}(
% endfor
)\
</code></synopsis>
+
+% if node.version:
+<p>Since ${node.version}</p>
+% endif
+ <synopsis ui:expanded="no">
+ <title>Hierarchy</title>
+ <tree>
+ <item>
+ <code>GObject.Object</code>
+ </item>
+ </tree>
+ </synopsis>
<links type="topic" ui:expanded="yes"
api:type="function" api:mime="text/x-python"
groups="method" style="linklist">
diff --git a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.Repository.page b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.Repository.page
index a5dd47b..bf38345 100644
--- a/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.Repository.page
+++ b/tests/doctool/GIRepository-2.0-Python-expected/GIRepository.Repository.page
@@ -10,6 +10,12 @@
</info>
<title>GIRepository.Repository</title>
+
+ <synopsis><code>
+from gi.repository import GIRepository
+
+repository = GIRepository.Repository() </code></synopsis>
+
<synopsis ui:expanded="no">
<title>Hierarchy</title>
<tree>
@@ -18,9 +24,6 @@
</item>
</tree>
</synopsis>
- <p>Constructor</p>
- <synopsis><code>
-repository = GIRepository.Repository() </code></synopsis>
<links type="topic" ui:expanded="yes"
api:type="function" api:mime="text/x-python"
groups="method" style="linklist">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]