Commit e77e2d1b authored by Richard Hughes's avatar Richard Hughes
Browse files

Only show the plugin loader state after all the plugins have been enabled

parent d8465b63
......@@ -164,6 +164,9 @@ gs_application_startup (GApplication *application)
gs_plugin_loader_set_enabled (app->plugin_loader, "datadir-apps", TRUE);
gs_plugin_loader_set_enabled (app->plugin_loader, "datadir-filename", TRUE);
/* show the priority of each plugin */
gs_plugin_loader_dump_state (app->plugin_loader);
/* setup UI */
app->shell = gs_shell_new ();
......
......@@ -1733,8 +1733,6 @@ gs_plugin_loader_setup (GsPluginLoader *plugin_loader, GError **error)
gboolean ret = TRUE;
gchar *filename_plugin;
GDir *dir;
GsPlugin *plugin;
guint i;
g_return_val_if_fail (plugin_loader->priv->location != NULL, FALSE);
......@@ -1764,15 +1762,6 @@ gs_plugin_loader_setup (GsPluginLoader *plugin_loader, GError **error)
g_ptr_array_sort (plugin_loader->priv->plugins,
gs_plugin_loader_plugin_sort_fn);
/* print what the priorities are */
for (i = 0; i < plugin_loader->priv->plugins->len; i++) {
plugin = g_ptr_array_index (plugin_loader->priv->plugins, i);
g_debug ("%.1f\t->\t%s [%s]",
plugin->priority,
plugin->name,
plugin->enabled ? "enabled" : "disabled");
}
/* run the plugins */
gs_plugin_loader_run (plugin_loader, "gs_plugin_initialize");
out:
......@@ -1781,6 +1770,25 @@ out:
return ret;
}
/**
* gs_plugin_loader_dump_state:
**/
void
gs_plugin_loader_dump_state (GsPluginLoader *plugin_loader)
{
GsPlugin *plugin;
guint i;
/* print what the priorities are */
for (i = 0; i < plugin_loader->priv->plugins->len; i++) {
plugin = g_ptr_array_index (plugin_loader->priv->plugins, i);
g_debug ("[%s]\t%.1f\t->\t%s",
plugin->enabled ? "enabled" : "disabled",
plugin->priority,
plugin->name);
}
}
/**
* gs_plugin_loader_plugin_free:
**/
......
......@@ -122,6 +122,7 @@ GList *gs_plugin_loader_search_finish (GsPluginLoader *plugin_loader,
GError **error);
gboolean gs_plugin_loader_setup (GsPluginLoader *plugin_loader,
GError **error);
void gs_plugin_loader_dump_state (GsPluginLoader *plugin_loader);
gboolean gs_plugin_loader_set_enabled (GsPluginLoader *plugin_loader,
const gchar *plugin_name,
gboolean enabled);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment