]> spindle.queued.net Git - midori/commitdiff
Display scripts using unsupported GM_ API as broken in panel
authorPaweł Forysiuk <tuxator@o2.pl>
Wed, 16 Mar 2011 19:41:22 +0000 (20:41 +0100)
committerChristian Dywan <christian@twotoasts.de>
Wed, 16 Mar 2011 20:46:05 +0000 (21:46 +0100)
extensions/addons.c

index d0bba27b502ed1e7449fe39530d429bcf222d00e..d09981212a79a1238d3be198402562b1986a086e 100644 (file)
@@ -1258,6 +1258,12 @@ addons_update_elements (MidoriExtension* extension,
                 if (!addons_get_element_content (fullpath, kind,
                                                  &(element->script_content)))
                     element->broken = TRUE;
+            if (element->script_content)
+            {
+                gchar* use_gm = g_strrstr_len (element->script_content , -1, "GM_");
+                if (use_gm && *use_gm)
+                    element->broken = TRUE;
+            }
 
             if (g_key_file_get_integer (keyfile, "scripts", fullpath, NULL) & 1)
                 element->enabled = FALSE;