[gnome-builder] dspy: provide method invocation signature from DspyArgInfo
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] dspy: provide method invocation signature from DspyArgInfo
- Date: Wed, 24 Apr 2019 22:53:37 +0000 (UTC)
commit 963f1b4a95002b33a0b01f6a1bf00d10d02e9814
Author: Christian Hergert <chergert redhat com>
Date: Wed Apr 24 15:53:24 2019 -0700
dspy: provide method invocation signature from DspyArgInfo
src/plugins/dspy/libdspy/dspy-tree-view.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/dspy/libdspy/dspy-tree-view.c b/src/plugins/dspy/libdspy/dspy-tree-view.c
index 5db96b566..677f655d6 100644
--- a/src/plugins/dspy/libdspy/dspy-tree-view.c
+++ b/src/plugins/dspy/libdspy/dspy-tree-view.c
@@ -85,7 +85,23 @@ dspy_tree_view_selection_changed (DspyTreeView *self,
dspy_method_invocation_set_method (invocation, node->method.name);
if (node->method.in_args.length == 0)
- dspy_method_invocation_set_parameters (invocation, g_variant_new ("()"));
+ {
+ dspy_method_invocation_set_parameters (invocation, g_variant_new ("()"));
+ }
+ else
+ {
+ g_autoptr(GString) str = g_string_new ("(");
+
+ for (const GList *list = node->method.in_args.head; list; list = list->next)
+ {
+ DspyArgInfo *info = list->data;
+ g_string_append (str, info->signature);
+ }
+
+ g_string_append_c (str, ')');
+
+ dspy_method_invocation_set_signature (invocation, str->str);
+ }
}
else if (node->any.kind == DSPY_NODE_KIND_PROPERTY)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]