[gnome-builder] snippets: raise priority of snippet completion
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] snippets: raise priority of snippet completion
- Date: Mon, 31 Oct 2016 00:05:06 +0000 (UTC)
commit ae3251c6746e5baf2b6a88e18be9104545820511
Author: Christian Hergert <chergert redhat com>
Date: Sun Oct 30 17:04:13 2016 -0700
snippets: raise priority of snippet completion
This should fire at a higher priority that our other plugins because they
are meant to be "quick acting completions" for common stuff we use all
the time.
.../ide-source-snippet-completion-provider.c | 6 +++++-
.../ide-source-snippet-completion-provider.h | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/libide/snippets/ide-source-snippet-completion-provider.c
b/libide/snippets/ide-source-snippet-completion-provider.c
index ccfce49..11c9b70 100644
--- a/libide/snippets/ide-source-snippet-completion-provider.c
+++ b/libide/snippets/ide-source-snippet-completion-provider.c
@@ -288,7 +288,11 @@ provider_get_interactive_delay (GtkSourceCompletionProvider *provider)
static gint
provider_get_priority (GtkSourceCompletionProvider *provider)
{
- return 100;
+ /* We want snippets at highest priority because they are
+ * used for quick hacking without having to think to much
+ * about whether they are active or not.
+ */
+ return IDE_SOURCE_SNIPPET_COMPLETION_PROVIDER_PRIORITY;
}
static gchar *
diff --git a/libide/snippets/ide-source-snippet-completion-provider.h
b/libide/snippets/ide-source-snippet-completion-provider.h
index 291300f..df8f322 100644
--- a/libide/snippets/ide-source-snippet-completion-provider.h
+++ b/libide/snippets/ide-source-snippet-completion-provider.h
@@ -26,7 +26,8 @@
G_BEGIN_DECLS
-#define IDE_TYPE_SOURCE_SNIPPET_COMPLETION_PROVIDER (ide_source_snippet_completion_provider_get_type())
+#define IDE_SOURCE_SNIPPET_COMPLETION_PROVIDER_PRIORITY 1000
+#define IDE_TYPE_SOURCE_SNIPPET_COMPLETION_PROVIDER (ide_source_snippet_completion_provider_get_type())
G_DECLARE_FINAL_TYPE (IdeSourceSnippetCompletionProvider, ide_source_snippet_completion_provider, IDE,
SOURCE_SNIPPET_COMPLETION_PROVIDER, GObject)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]