diff options
author | Debarshi Ray <debarshir@gnome.org> | 2016-05-26 19:09:24 +0200 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2016-07-14 18:51:43 +0200 |
commit | 34d84d43c32adcabf897259da110c46cd40a45d9 (patch) | |
tree | 1ea205cfdb4c529cfcee38458e9ccc117ff8fd30 | |
parent | dda2ff2a606b4e220c53d032e638fb6ddc4fcd73 (diff) | |
download | gnome-online-accounts-34d84d43c32adcabf897259da110c46cd40a45d9.tar.gz |
daemon: Call goa_provider_initialize during start-up
https://bugzilla.gnome.org/show_bug.cgi?id=766733
-rw-r--r-- | src/daemon/goadaemon.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c index 155f9e9..0d929f3 100644 --- a/src/daemon/goadaemon.c +++ b/src/daemon/goadaemon.c @@ -261,6 +261,9 @@ static void goa_daemon_init (GoaDaemon *self) { static volatile GQuark goa_error_domain = 0; + GError *error; + GList *l; + GList *providers = NULL; GoaObjectSkeleton *object; gchar *path; @@ -270,7 +273,21 @@ goa_daemon_init (GoaDaemon *self) goa_error_domain = GOA_ERROR; goa_error_domain; /* shut up -Wunused-but-set-variable */ - goa_provider_ensure_builtins_loaded (); + error = NULL; + if (!get_all_providers_sync (NULL, &providers, &error)) + { + g_warning ("Unable to get the list of providers: %s (%s, %d)", + error->message, + g_quark_to_string (error->domain), + error->code); + g_error_free (error); + } + + for (l = providers; l != NULL; l = l->next) + { + GoaProvider *provider = GOA_PROVIDER (l->data); + goa_provider_initialize (provider); + } /* TODO: maybe nicer to pass in a GDBusConnection* construct property */ self->connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); |