[gnome-builder] plugins/ctags: implement get_typed_text vfunc
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] plugins/ctags: implement get_typed_text vfunc
- Date: Sat, 3 Sep 2022 06:44:31 +0000 (UTC)
commit 8a4060e7331459935997abc626d74ce481228d61
Author: Christian Hergert <chergert redhat com>
Date: Fri Sep 2 23:40:16 2022 -0700
plugins/ctags: implement get_typed_text vfunc
src/plugins/ctags/ide-ctags-completion-item.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/ctags/ide-ctags-completion-item.c b/src/plugins/ctags/ide-ctags-completion-item.c
index aa345d9dc..8675496e4 100644
--- a/src/plugins/ctags/ide-ctags-completion-item.c
+++ b/src/plugins/ctags/ide-ctags-completion-item.c
@@ -28,10 +28,22 @@
#include "ide-ctags-index.h"
#include "ide-ctags-results.h"
+static char *
+ide_ctags_completion_item_get_typed_text (GtkSourceCompletionProposal *proposal)
+{
+ return g_strdup (IDE_CTAGS_COMPLETION_ITEM (proposal)->entry->name);
+}
+
+static void
+proposal_iface_init (GtkSourceCompletionProposalInterface *iface)
+{
+ iface->get_typed_text = ide_ctags_completion_item_get_typed_text;
+}
+
G_DEFINE_FINAL_TYPE_WITH_CODE (IdeCtagsCompletionItem,
ide_ctags_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))
IdeCtagsCompletionItem *
ide_ctags_completion_item_new (IdeCtagsResults *results,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]