[Xfce4-commits] <midori:master> Don't show Netscape plugins admist extensions

Christian Dywan noreply at xfce.org
Thu Nov 18 23:30:02 CET 2010


Updating branch refs/heads/master
         to 1ac006804bb0197bfaa26799565aa113ce5a0678 (commit)
       from 211e5314fbd356803dc1f19e187edea7caaf7a0d (commit)

commit 1ac006804bb0197bfaa26799565aa113ce5a0678
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Nov 18 21:02:37 2010 +0100

    Don't show Netscape plugins admist extensions
    
    People keep thinking plugins could be disabled like extensions.

 midori/main.c |   50 --------------------------------------------------
 1 files changed, 0 insertions(+), 50 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index b276b5f..9e5a4ad 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -1045,53 +1045,6 @@ midori_load_cookie_jar (gpointer data)
 }
 
 static gboolean
-midori_load_netscape_plugins (gpointer data)
-{
-    MidoriApp* app = MIDORI_APP (data);
-    KatzeArray* extensions = katze_object_get_object (app, "extensions");
-    /* FIXME: WebKit should have API to obtain the list of plugins. */
-    /* FIXME: Monitor folders for newly added and removes files */
-    GtkWidget* web_view = webkit_web_view_new ();
-    WebKitWebFrame* web_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (web_view));
-    JSContextRef js_context = webkit_web_frame_get_global_context (web_frame);
-    /* This snippet joins the available plugins into a string like this:
-        URI1|title1,URI2|title2
-    FIXME: Ensure separators contained in the string can't break it */
-    gchar* value = sokoke_js_script_eval (js_context,
-        "function plugins (l) { var f = new Array (); for (i in l) "
-        "{ var p = l[i].name + '|' + l[i].filename; "
-        "if (f.indexOf (p) == -1) f.push (p); } return f; }"
-        "plugins (navigator.plugins)", NULL);
-    gchar** items = g_strsplit (value, ",", 0);
-    guint i = 0;
-
-    if (items != NULL)
-    while (items[i] != NULL)
-    {
-        gchar** parts = g_strsplit (items[i], "|", 2);
-        if (parts && *parts && !g_str_equal (parts[1], "undefined"))
-        {
-            MidoriExtension* extension;
-            gchar* desc = parts[1];
-            gsize j = 0;
-            while (desc[j++])
-                if (desc[j-1] == ';')
-                    desc[j-1] = '\n';
-            extension = g_object_new (MIDORI_TYPE_EXTENSION,
-                "name", parts[0], "description", desc, NULL);
-            g_object_set_data (G_OBJECT (extension), "static", (void*)0xdeadbeef);
-            katze_array_add_item (extensions, extension);
-        }
-        g_strfreev (parts);
-        i++;
-    }
-    g_strfreev (items);
-    g_object_unref (extensions);
-
-    return FALSE;
-}
-
-static gboolean
 midori_load_extensions (gpointer data)
 {
     MidoriApp* app = MIDORI_APP (data);
@@ -1194,9 +1147,6 @@ midori_load_extensions (gpointer data)
     }
     g_strfreev (active_extensions);
 
-    if (g_getenv ("MIDORI_UNARMED") == NULL)
-        g_idle_add (midori_load_netscape_plugins, app);
-
     #ifdef G_ENABLE_DEBUG
     if (startup_timer)
         g_debug ("Extensions:\t%f", g_test_timer_elapsed ());



More information about the Xfce4-commits mailing list