Commit b1683ce6 authored by Michael Natterer's avatar Michael Natterer 😴

app: remove all check for the <Load> and <Save> menu prefixes

they are an ancient concept not supported any longer.
parent a20fb094
......@@ -769,27 +769,6 @@ gimp_plug_in_manager_add_from_rc (GimpPlugInManager *manager,
basename1 = g_path_get_basename (path1);
/* If this is a file load or save plugin, make sure we have
* something for one of the extensions, prefixes, or magic number.
* Other bits of code rely on detecting file plugins by the
* presence of one of these things, but the raw plug-in needs to be
* able to register no extensions, prefixes or magics.
*/
for (list = plug_in_def->procedures; list; list = list->next)
{
GimpPlugInProcedure *proc = list->data;
if (! proc->extensions &&
! proc->prefixes &&
! proc->magics &&
proc->menu_paths &&
(g_str_has_prefix (proc->menu_paths->data, "<Load>") ||
g_str_has_prefix (proc->menu_paths->data, "<Save>")))
{
proc->extensions = g_strdup ("");
}
}
/* Check if the entry mentioned in pluginrc matches an executable
* found in the plug_in_path.
*/
......
......@@ -712,37 +712,6 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc,
goto failure;
}
}
else if (g_str_has_prefix (menu_path, "<Load>"))
{
if ((procedure->num_args < 3) ||
! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) ||
! G_IS_PARAM_SPEC_STRING (procedure->args[1]) ||
! G_IS_PARAM_SPEC_STRING (procedure->args[2]))
{
required = "GimpRunMode, String, String";
goto failure;
}
if ((procedure->num_values < 1) ||
! GIMP_IS_PARAM_SPEC_IMAGE (procedure->values[0]))
{
required = "GimpImage";
goto failure;
}
}
else if (g_str_has_prefix (menu_path, "<Save>"))
{
if ((procedure->num_args < 5) ||
! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) ||
! GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]) ||
! GIMP_IS_PARAM_SPEC_DRAWABLE (procedure->args[2]) ||
! G_IS_PARAM_SPEC_STRING (procedure->args[3]) ||
! G_IS_PARAM_SPEC_STRING (procedure->args[4]))
{
required = "GimpRunMode, GimpImage, GimpDrawable, String, String";
goto failure;
}
}
else if (g_str_has_prefix (menu_path, "<Brushes>") ||
g_str_has_prefix (menu_path, "<Dynamics>") ||
g_str_has_prefix (menu_path, "<MyPaintBrushes>") ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment