[totem] Bug 642877 — Make sure all builtin plugins are in the active-plugins list
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] Bug 642877 — Make sure all builtin plugins are in the active-plugins list
- Date: Sun, 27 Feb 2011 20:53:02 +0000 (UTC)
commit 5c1512896b0728b0f3365e502eb7b21a184cb4ab
Author: Philip Withnall <philip tecnocode co uk>
Date: Sun Feb 27 20:52:07 2011 +0000
Bug 642877 â?? Make sure all builtin plugins are in the active-plugins list
Force-load all the builtin plugins just after setting up the plugins engine.
This ensures that if a builtin plugin isn't in the active-plugins list in
GSettings, it will still get loaded and activated. Closes: bgo#642877
src/plugins/totem-plugins-engine.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/totem-plugins-engine.c b/src/plugins/totem-plugins-engine.c
index 4518fe2..f53c0c3 100644
--- a/src/plugins/totem-plugins-engine.c
+++ b/src/plugins/totem-plugins-engine.c
@@ -99,6 +99,7 @@ totem_plugins_engine_get_default (TotemObject *totem)
static TotemPluginsEngine *engine = NULL;
char **paths;
guint i;
+ const GList *plugin_infos, *l;
if (G_LIKELY (engine != NULL))
return g_object_ref (engine);
@@ -139,6 +140,17 @@ totem_plugins_engine_get_default (TotemObject *totem)
g_settings_bind (engine->priv->settings, "active-plugins", engine, "loaded-plugins", G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_NO_SENSITIVITY);
+ /* Load builtin plugins */
+ plugin_infos = peas_engine_get_plugin_list (PEAS_ENGINE (engine));
+
+ for (l = plugin_infos; l != NULL; l = l->next) {
+ PeasPluginInfo *plugin_info = PEAS_PLUGIN_INFO (l->data);
+
+ if (peas_plugin_info_is_builtin (plugin_info)) {
+ peas_engine_load_plugin (PEAS_ENGINE (engine), plugin_info);
+ }
+ }
+
return engine;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]