]> spindle.queued.net Git - midori/commitdiff
Show even broken (not linking) extensions in the panel
authorChristian Dywan <christian@twotoasts.de>
Fri, 19 Dec 2008 23:25:31 +0000 (00:25 +0100)
committerChristian Dywan <christian@twotoasts.de>
Fri, 19 Dec 2008 23:25:31 +0000 (00:25 +0100)
midori/main.c

index e4d29ac4df506aa4ec6829c6160f96407d408918..19c0704767df8a6f68f6cd607936e78b1e6e2052 100644 (file)
@@ -2020,20 +2020,17 @@ main (int    argc,
             fullname = g_build_filename (extension_path, filename, NULL);
             module = g_module_open (fullname, G_MODULE_BIND_LOCAL);
             g_free (fullname);
-            if (!module)
-            {
-                g_warning ("%s", g_module_error ());
-                continue;
-            }
-            ;
-            if (!g_module_symbol (module, "extension_init",
-                             (gpointer) &extension_init))
-            {
-                g_warning ("%s", g_module_error ());
-                continue;
-            }
-            extension = extension_init ();
+
+            if (module && g_module_symbol (module, "extension_init",
+                                            (gpointer) &extension_init))
+                extension = extension_init ();
+            else
+                extension = g_object_new (MIDORI_TYPE_EXTENSION,
+                                          "name", filename,
+                                          "description", g_module_error (),
+                                          NULL);
             katze_array_add_item (extensions, extension);
+            g_object_unref (extension);
         }
         g_dir_close (extension_dir);
     }