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



commit b1683ce692847ee35209e19b4706480c6d6722bf
Author: Michael Natterer <mitch gimp org>
Date:   Tue Sep 10 12:14:57 2019 +0200

    app: remove all check for the <Load> and <Save> menu prefixes
    
    they are an ancient concept not supported any longer.

 app/plug-in/gimppluginmanager-restore.c | 21 ---------------------
 app/plug-in/gimppluginprocedure.c       | 31 -------------------------------
 2 files changed, 52 deletions(-)
---
diff --git a/app/plug-in/gimppluginmanager-restore.c b/app/plug-in/gimppluginmanager-restore.c
index 45e245a225..e6fd9b1711 100644
--- a/app/plug-in/gimppluginmanager-restore.c
+++ b/app/plug-in/gimppluginmanager-restore.c
@@ -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.
    */
diff --git a/app/plug-in/gimppluginprocedure.c b/app/plug-in/gimppluginprocedure.c
index d5f49cb2f9..a81011e6be 100644
--- a/app/plug-in/gimppluginprocedure.c
+++ b/app/plug-in/gimppluginprocedure.c
@@ -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>") ||


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]