summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/mallard-Python-class.tmpl27
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">