/** * gs_plugin_loader_refresh_finish_sync: **/ static void gs_plugin_loader_refresh_finish_sync (GsPluginLoader *plugin_loader, GAsyncResult *res, GsPluginLoaderHelper *helper) { helper->ret = gs_plugin_loader_refresh_finish (plugin_loader, res, helper->error); g_main_loop_quit (helper->loop); }
static void gs_shell_loading_refresh_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) { GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (source_object); GsShellLoading *self = GS_SHELL_LOADING (user_data); g_autoptr(GError) error = NULL; /* no longer care */ g_signal_handlers_disconnect_by_data (plugin_loader, self); /* not sure how to handle this */ if (!gs_plugin_loader_refresh_finish (plugin_loader, res, &error)) { g_warning ("failed to load metadata: %s", error->message); return; } /* UI is good to go */ g_signal_emit (self, signals[SIGNAL_REFRESHED], 0); }