[mutter] mutter: Only allow one plugin to be loaded



commit 80a70a4ad1051a741f1e6e631d6cbf2a828bd5bb
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Apr 5 00:50:21 2012 -0400

    mutter: Only allow one plugin to be loaded
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676855

 src/core/mutter.c |   22 +++++++---------------
 1 files changed, 7 insertions(+), 15 deletions(-)
---
diff --git a/src/core/mutter.c b/src/core/mutter.c
index 4c140d9..63462f9 100644
--- a/src/core/mutter.c
+++ b/src/core/mutter.c
@@ -45,7 +45,7 @@ print_version (const gchar    *option_name,
   exit (0);
 }
 
-static gchar *mutter_plugins;
+static gchar *plugin;
 
 GOptionEntry mutter_options[] = {
   {
@@ -55,10 +55,10 @@ GOptionEntry mutter_options[] = {
     NULL
   },
   {
-    "mutter-plugins", 0, 0, G_OPTION_ARG_STRING,
-    &mutter_plugins,
-    N_("Comma-separated list of compositor plugins"),
-    "PLUGINS"
+    "mutter-plugin", 0, 0, G_OPTION_ARG_STRING,
+    &plugin,
+    N_("Mutter plugin to use"),
+    "PLUGIN",
   },
   { NULL }
 };
@@ -79,19 +79,11 @@ main (int argc, char **argv)
       exit (1);
     }
 
-  if (mutter_plugins)
+  if (plugin)
     {
       MetaPluginManager *mgr;
-      char **plugins = g_strsplit (mutter_plugins, ",", -1); 
-      char **plugin;
-
       mgr = meta_plugin_manager_get_default ();
-      for (plugin = plugins; *plugin; plugin++)
-        {
-          g_strstrip (*plugin);
-          meta_plugin_manager_load (mgr, *plugin);
-        }
-      g_strfreev (plugins);
+      meta_plugin_manager_load (mgr, plugin);
     }
 
   meta_init ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]