summaryrefslogtreecommitdiff
path: root/gi/_gtktemplate.py
diff options
context:
space:
mode:
Diffstat (limited to 'gi/_gtktemplate.py')
-rw-r--r--gi/_gtktemplate.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gi/_gtktemplate.py b/gi/_gtktemplate.py
index a631a6eb..925aa0dd 100644
--- a/gi/_gtktemplate.py
+++ b/gi/_gtktemplate.py
@@ -78,9 +78,12 @@ def define_builder_scope():
handler, args = _extract_handler_and_args(current_object, handler_name)
if obj:
- return partial(handler, *args, swap_data=obj)
+ p = partial(handler, *args, swap_data=obj)
+ else:
+ p = partial(handler, *args)
- return partial(handler, *args)
+ p.__gtk_template__ = True
+ return p
return BuilderScope