[seahorse] Application: unbreak the search provider



commit 7d05d9f015d6d88ad5feee4fdc5a41db83ea3fea
Author: Giovanni Campagna <scampa giovanni gmail com>
Date:   Sun Mar 8 14:58:13 2015 -0700

    Application: unbreak the search provider
    
    It must be initialized after backends are registered, otherwise
    it will always report 0 secrets.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704619

 libseahorse/seahorse-application.c |   12 ++++++------
 libseahorse/seahorse-application.h |    2 ++
 src/seahorse-main.c                |    3 +++
 3 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/libseahorse/seahorse-application.c b/libseahorse/seahorse-application.c
index a043284..4df83be 100644
--- a/libseahorse/seahorse-application.c
+++ b/libseahorse/seahorse-application.c
@@ -91,12 +91,6 @@ seahorse_application_startup (GApplication *application)
        /* Insert Icons into Stock */
        seahorse_icons_init ();
 
-       seahorse_search_provider_initialize (SEAHORSE_APPLICATION (application)->search_provider);
-
-       /* HACK: get the inactivity timeout started */
-       g_application_hold (application);
-       g_application_release (application);
-
        G_APPLICATION_CLASS (seahorse_application_parent_class)->startup (application);
 }
 
@@ -278,3 +272,9 @@ seahorse_application_pgp_settings (SeahorseApplication *self)
        g_return_val_if_fail (SEAHORSE_IS_APPLICATION (self), NULL);
        return self->crypto_pgp_settings;
 }
+
+void
+seahorse_application_initialize_search (SeahorseApplication *self)
+{
+       seahorse_search_provider_initialize (self->search_provider);
+}
diff --git a/libseahorse/seahorse-application.h b/libseahorse/seahorse-application.h
index 5773ed6..5287d4e 100644
--- a/libseahorse/seahorse-application.h
+++ b/libseahorse/seahorse-application.h
@@ -46,4 +46,6 @@ GSettings *         seahorse_application_settings                (SeahorseApplic
 
 GSettings *         seahorse_application_pgp_settings            (SeahorseApplication *self);
 
+void                seahorse_application_initialize_search       (SeahorseApplication *self);
+
 #endif /* __SEAHORSE_APPLICATION_H__ */
diff --git a/src/seahorse-main.c b/src/seahorse-main.c
index 8c565ca..e692ba5 100644
--- a/src/seahorse-main.c
+++ b/src/seahorse-main.c
@@ -64,6 +64,9 @@ on_application_startup (GApplication *application,
        seahorse_pkcs11_backend_initialize ();
 #endif
        seahorse_gkr_backend_initialize ();
+
+       /* Initialize the search provider now that backends are registered */
+       seahorse_application_initialize_search (SEAHORSE_APPLICATION (application));
 }
 
 /* Initializes context and preferences, then loads key manager */


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