Blob Blame History Raw
From 2b1d6d699e4394393da009a6f0e58f58fc6501e2 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@igalia.com>
Date: Wed, 10 Sep 2014 22:01:35 -0500
Subject: search-provider: don't live forever

Search providers are supposed to quit after running for a few seconds.

https://bugzilla.gnome.org/show_bug.cgi?id=735912

diff --git a/src/ephy-search-provider.c b/src/ephy-search-provider.c
index 31a517d..dbe1049 100644
--- a/src/ephy-search-provider.c
+++ b/src/ephy-search-provider.c
@@ -52,6 +52,8 @@ struct _EphySearchProviderClass
 
 G_DEFINE_TYPE (EphySearchProvider, ephy_search_provider, G_TYPE_APPLICATION)
 
+#define INACTIVITY_TIMEOUT 60 * 1000 /* One minute, in milliseconds */
+
 static void
 on_model_updated (EphyHistoryService *service,
 		  gboolean            success,
@@ -369,6 +371,8 @@ ephy_search_provider_init (EphySearchProvider *self)
   g_free (filename);
 
   self->cancellable = g_cancellable_new ();
+
+  g_application_set_inactivity_timeout (G_APPLICATION (self), INACTIVITY_TIMEOUT);
 }
 
 static gboolean
-- 
cgit v0.10.1