Fallback to default plugin if no plugins are specified via gconf.

This commit is contained in:
Tomas Frydrych 2008-10-09 15:33:06 +01:00
parent 1a8e5872d1
commit 0225449e12

View File

@ -311,10 +311,19 @@ static gboolean
meta_compositor_clutter_plugin_manager_load (MetaCompositorClutterPluginManager *mgr)
{
const gchar *dpath = METACITY_PKGLIBDIR "/plugins/clutter/";
GSList *plugins;
GSList *plugins, *fallback = NULL;
plugins = meta_prefs_get_clutter_plugins ();
if (!plugins)
{
/*
* If no plugins are specified, try to load the default plugin.
*/
fallback = g_slist_append (fallback, "default");
plugins = fallback;
}
while (plugins)
{
gchar *plg_string;
@ -360,6 +369,10 @@ meta_compositor_clutter_plugin_manager_load (MetaCompositorClutterPluginManager
plugins = plugins->next;
}
if (fallback)
g_slist_free (fallback);
if (mgr->plugins != NULL)
{
meta_prefs_add_listener (prefs_changed_callback, mgr);