]> Dogcows Code - chaz/openbox/blobdiff - openbox/plugin.c
skip comments and empty lines
[chaz/openbox] / openbox / plugin.c
index 281b1cdec08ea344bc1cd76c3b2bd5754ed3ba17..ca86aca439a691f74d80459a7c8c71ec46d23c22 100644 (file)
@@ -44,6 +44,7 @@ static Plugin *plugin_new(char *name)
     }
 
     if (p->module == NULL) {
+        g_warning(g_module_error());
         g_free(p);
         return NULL;
     }
@@ -139,7 +140,6 @@ void plugin_loadall()
 
     if (io == NULL) {
         /* load the default plugins */
-        plugin_open("focus");
         plugin_open("keyboard");
         plugin_open("mouse");
         plugin_open("placement");
@@ -148,9 +148,13 @@ void plugin_loadall()
         /* load the plugins in the rc file */
         while (g_io_channel_read_line(io, &name, NULL, NULL, &err) ==
                G_IO_STATUS_NORMAL) {
-            g_strstrip(name);
-            plugin_open(name);
-            g_free(name);
+            int i = 0;
+            while (name[++i-1] == ' ' || name[i-1] == '\t');
+            if (name[i] != '\0' && name[i] != '#') {
+                g_strstrip(name);
+                plugin_open(name);
+                g_free(name);
+            }
         }
         g_io_channel_unref(io);
     }
This page took 0.022872 seconds and 4 git commands to generate.