summaryrefslogtreecommitdiff
path: root/src/nautilus-search-provider.c
diff options
context:
space:
mode:
authorAlexandru Pandelea <alexandru.pandelea@gmail.com>2017-08-02 10:54:25 +0100
committerAlexandru Pandelea <alexandru.pandelea@gmail.com>2017-08-15 21:42:15 +0100
commit37693c427941d60634bad80dd7c2d0b3a8523cea (patch)
tree6c4e5401c3b6e8bd0214f00a78d8520dbbb8be5e /src/nautilus-search-provider.c
parentafa26e43a716e70160412ce11c1c8dddfd44b6cc (diff)
downloadnautilus-37693c427941d60634bad80dd7c2d0b3a8523cea.tar.gz
search-engine: fix search providers handling
When starting the search providers, some provider might finish before all providers are started, so a wrong value of providers_running will be used, making Nautilus crash. To fix this, keep a queue of the started providers and whenever the value of the finised/running providers is needed, check the status of each provider. https://bugzilla.gnome.org/show_bug.cgi?id=785723
Diffstat (limited to 'src/nautilus-search-provider.c')
-rw-r--r--src/nautilus-search-provider.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nautilus-search-provider.c b/src/nautilus-search-provider.c
index 9a4a6553d..572e34d42 100644
--- a/src/nautilus-search-provider.c
+++ b/src/nautilus-search-provider.c
@@ -143,3 +143,12 @@ nautilus_search_provider_is_running (NautilusSearchProvider *provider)
return NAUTILUS_SEARCH_PROVIDER_GET_IFACE (provider)->is_running (provider);
}
+
+gboolean
+nautilus_search_provider_is_finished (NautilusSearchProvider *provider)
+{
+ g_return_val_if_fail (NAUTILUS_IS_SEARCH_PROVIDER (provider), FALSE);
+ g_return_val_if_fail (NAUTILUS_SEARCH_PROVIDER_GET_IFACE (provider)->is_finished, FALSE);
+
+ return NAUTILUS_SEARCH_PROVIDER_GET_IFACE (provider)->is_finished (provider);
+}