[gnome-builder] plugins/clang: implement get_typed_text vfunc
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] plugins/clang: implement get_typed_text vfunc
- Date: Sat, 3 Sep 2022 06:44:30 +0000 (UTC)
commit 093f82cda9e1e97b06c10f9a4648a7755c7dd6f5
Author: Christian Hergert <chergert redhat com>
Date: Fri Sep 2 23:31:00 2022 -0700
plugins/clang: implement get_typed_text vfunc
src/plugins/clang/ide-clang-completion-item.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/clang/ide-clang-completion-item.c b/src/plugins/clang/ide-clang-completion-item.c
index 027642773..8d50d4a3f 100644
--- a/src/plugins/clang/ide-clang-completion-item.c
+++ b/src/plugins/clang/ide-clang-completion-item.c
@@ -36,8 +36,20 @@
# pragma GCC diagnostic pop
#endif
+static char *
+ide_clang_completion_item_get_typed_text (GtkSourceCompletionProposal *proposal)
+{
+ return g_strdup (IDE_CLANG_COMPLETION_ITEM (proposal)->typed_text);
+}
+
+static void
+proposal_iface_init (GtkSourceCompletionProposalInterface *iface)
+{
+ iface->get_typed_text = ide_clang_completion_item_get_typed_text;
+}
+
G_DEFINE_FINAL_TYPE_WITH_CODE (IdeClangCompletionItem, ide_clang_completion_item, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (GTK_SOURCE_TYPE_COMPLETION_PROPOSAL, NULL))
+ G_IMPLEMENT_INTERFACE (GTK_SOURCE_TYPE_COMPLETION_PROPOSAL,
proposal_iface_init))
static void
ide_clang_completion_item_do_init (IdeClangCompletionItem *self)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]