[gnome-builder] search: add provider priorities



commit b2cd2a25f85b1fde1845902b885dbfa23d364bce
Author: Christian Hergert <christian hergert me>
Date:   Fri Jun 12 21:44:46 2015 -0700

    search: add provider priorities

 plugins/devhelp/gb-devhelp-search-provider.c  |    7 +++++++
 plugins/file-search/gb-file-search-provider.c |    7 +++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/plugins/devhelp/gb-devhelp-search-provider.c b/plugins/devhelp/gb-devhelp-search-provider.c
index 3523c67..9aace77 100644
--- a/plugins/devhelp/gb-devhelp-search-provider.c
+++ b/plugins/devhelp/gb-devhelp-search-provider.c
@@ -184,6 +184,12 @@ gb_devhelp_search_provider_activate (IdeSearchProvider *provider,
   g_free (uri);
 }
 
+static gint
+gb_devhelp_search_provider_get_priority (IdeSearchProvider *provider)
+{
+  return 100;
+}
+
 static void
 gb_devhelp_search_provider_finalize (GObject *object)
 {
@@ -217,4 +223,5 @@ search_provider_iface_init (IdeSearchProviderInterface *iface)
   iface->get_verb = gb_devhelp_search_provider_get_verb;
   iface->populate = gb_devhelp_search_provider_populate;
   iface->activate = gb_devhelp_search_provider_activate;
+  iface->get_priority = gb_devhelp_search_provider_get_priority;
 }
diff --git a/plugins/file-search/gb-file-search-provider.c b/plugins/file-search/gb-file-search-provider.c
index 89fce9d..db8c0b4 100644
--- a/plugins/file-search/gb-file-search-provider.c
+++ b/plugins/file-search/gb-file-search-provider.c
@@ -124,6 +124,12 @@ gb_file_search_provider_activate (IdeSearchProvider *provider,
     }
 }
 
+static gint
+gb_file_search_provider_get_priority (IdeSearchProvider *provider)
+{
+  return 0;
+}
+
 static void
 gb_file_search_provider_constructed (GObject *object)
 {
@@ -180,4 +186,5 @@ search_provider_iface_init (IdeSearchProviderInterface *iface)
   iface->get_verb = gb_file_search_provider_get_verb;
   iface->create_row = gb_file_search_provider_create_row;
   iface->activate = gb_file_search_provider_activate;
+  iface->get_priority = gb_file_search_provider_get_priority;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]