diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2012-02-20 13:44:00 +0100 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2012-02-20 13:44:00 +0100 |
commit | 8c7e27b90ceb176d463399735220df806ee7f35f (patch) | |
tree | 27e6669d5e9dedf0c7b4e62337e8364c2140a865 /giscanner | |
parent | 99109f5a8ae11b7f182da497ca7b2d1dc3d11920 (diff) | |
download | gobject-introspection-8c7e27b90ceb176d463399735220df806ee7f35f.tar.gz |
g-ir-doc-tool: Move constructor example to follow the class doc body
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/mallard-Python-class.tmpl | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/giscanner/mallard-Python-class.tmpl b/giscanner/mallard-Python-class.tmpl index 5437fcd4..489a4295 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"> |