summaryrefslogtreecommitdiff
path: root/giscanner/girparser.py
diff options
context:
space:
mode:
authorJohan Dahlin <jdahlin@litl.com>2011-08-13 10:35:13 -0300
committerJohan Dahlin <jdahlin@litl.com>2011-08-13 11:10:21 -0300
commita616479d5508fcf42fbfddcda543cc96f2130516 (patch)
tree0634a823305aa938d4e195a3e54c0fa83bff6f0f /giscanner/girparser.py
parent2dc8a2cb325eaab7b4b229c49228c4e6aac32747 (diff)
downloadgobject-introspection-a616479d5508fcf42fbfddcda543cc96f2130516.tar.gz
Add signal flags
This adds all GSignalFlags into the gir. https://bugzilla.gnome.org/show_bug.cgi?id=656457
Diffstat (limited to 'giscanner/girparser.py')
-rw-r--r--giscanner/girparser.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/giscanner/girparser.py b/giscanner/girparser.py
index 51de1b15..ffe0dbc3 100644
--- a/giscanner/girparser.py
+++ b/giscanner/girparser.py
@@ -268,7 +268,7 @@ class GIRParser(object):
for prop in self._find_children(node, _corens('property')):
obj.properties.append(self._parse_property(prop))
for signal in self._find_children(node, _glibns('signal')):
- obj.signals.append(self._parse_function_common(signal, ast.Function))
+ obj.signals.append(self._parse_function_common(signal, ast.Signal))
def _parse_callback(self, node):
callback = self._parse_function_common(node, ast.Callback)
@@ -298,6 +298,13 @@ class GIRParser(object):
func = klass(name, retval, parameters, throws, identifier)
elif klass is ast.VFunction:
func = klass(name, retval, parameters, throws)
+ elif klass is ast.Signal:
+ func = klass(name, retval, parameters,
+ when=node.attrib.get('when', 'first'),
+ no_recurse=node.attrib.get('no-recurse', '0') == '1',
+ detailed=node.attrib.get('detailed', '0') == '1',
+ action=node.attrib.get('action', '0') == '1',
+ no_hooks=node.attrib.get('no-hooks', '0') == '1')
else:
assert False