Display scripts using unsupported GM_ API as broken in panel

This commit is contained in:
Paweł Forysiuk 2011-03-16 20:41:22 +01:00 committed by Christian Dywan
parent 7871d26c09
commit 241a7ffb06

View 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;