[epiphany/gnome-3-12] search-provider: don't live forever



commit 6ff3495869dc9a471757ac9c102ba780f1fe7053
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed Sep 10 22:01:35 2014 -0500

    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

 src/ephy-search-provider.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/ephy-search-provider.c b/src/ephy-search-provider.c
index ec9d4a3..3b41f07 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 10000 /* Ten seconds, 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


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