summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-02-15 08:16:16 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-02-15 08:18:51 -0500
commit6727ebea5bcd2d823fb05c0df67efff4e77436ea (patch)
tree68874143eba74c431252c9a1d7062d6a9f4a615c /giscanner
parent34f697e552c648efa1f0f6350cdbc80cd346a1e4 (diff)
downloadgobject-introspection-6727ebea5bcd2d823fb05c0df67efff4e77436ea.tar.gz
doctool: Don't put curly braces around the construct props if there are none
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/doctemplates/Gjs/class.tmpl8
1 files changed, 6 insertions, 2 deletions
diff --git a/giscanner/doctemplates/Gjs/class.tmpl b/giscanner/doctemplates/Gjs/class.tmpl
index 5882d9fa..457361c7 100644
--- a/giscanner/doctemplates/Gjs/class.tmpl
+++ b/giscanner/doctemplates/Gjs/class.tmpl
@@ -3,12 +3,16 @@
<synopsis><code>
const ${namespace.name} = imports.gi.${namespace.name};
-let ${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}({
+let ${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}(\
+% if len(node.properties) > 0:
+{
% for ix, property_ in enumerate(node.properties):
% if property_.construct or property_.construct_only or property_.writable:
<link xref='${namespace.name}.${node.name}-${property_.name}'>${property_.name.replace('-', '_')}</link>: value,
% endif
% endfor
-});
+}\
+% endif
+);
</code></synopsis>
</%block>