[gimp] Remove the second "raw-filename"/"raw-uri" parameter from file procedures



commit f3fb3d1a57944a459ecc053c55587470c0029da2
Author: Michael Natterer <mitch gimp org>
Date:   Wed Sep 11 00:21:03 2019 +0200

    Remove the second "raw-filename"/"raw-uri" parameter from file procedures
    
    It's an ancient concept from ancient times when we didn't have URIs
    and only filenames (not to speak of GFile), and actually even from
    before the ancient time before that ancient time when we first had
    ones and zeros, and only had zeros.

 app/actions/file-commands.c                  |  2 +-
 app/core/gimpimagefile.c                     |  1 -
 app/dialogs/file-open-dialog.c               |  2 +-
 app/dialogs/file-open-location-dialog.c      | 11 +-----
 app/file-data/file-data.c                    | 56 ----------------------------
 app/file/file-open.c                         | 17 +--------
 app/file/file-open.h                         |  2 -
 app/file/file-save.c                         |  1 -
 app/pdb/file-cmds.c                          | 24 +-----------
 app/plug-in/gimpplugin-proc.c                | 30 ++++++++++-----
 app/plug-in/gimppluginprocedure.c            |  4 +-
 app/xcf/xcf.c                                | 16 --------
 libgimp/gimpfile_pdb.c                       | 10 +----
 libgimp/gimpfile_pdb.h                       |  6 +--
 libgimp/gimploadprocedure.c                  | 13 ++-----
 libgimp/gimpsaveprocedure.c                  | 13 ++-----
 pdb/groups/file.pdb                          | 18 ++-------
 plug-ins/common/file-compressor.c            |  3 +-
 plug-ins/common/file-desktop-link.c          |  2 +-
 plug-ins/common/file-gbr.c                   |  1 -
 plug-ins/common/file-gih.c                   |  1 -
 plug-ins/common/file-pat.c                   |  1 -
 plug-ins/common/mail.c                       |  1 -
 plug-ins/file-raw/file-darktable.c           |  6 +--
 plug-ins/file-raw/file-rawtherapee.c         |  6 +--
 plug-ins/screenshot/screenshot-freedesktop.c |  3 +-
 plug-ins/screenshot/screenshot-gnome-shell.c |  3 +-
 plug-ins/screenshot/screenshot-kwin.c        |  3 +-
 28 files changed, 52 insertions(+), 204 deletions(-)
---
diff --git a/app/actions/file-commands.c b/app/actions/file-commands.c
index 00a8f37fc5..5c949fea5f 100644
--- a/app/actions/file-commands.c
+++ b/app/actions/file-commands.c
@@ -814,7 +814,7 @@ file_revert_confirm_response (GtkWidget   *dialog,
 
       new_image = file_open_image (gimp, gimp_get_user_context (gimp),
                                    GIMP_PROGRESS (display),
-                                   file, file, FALSE, NULL,
+                                   file, FALSE, NULL,
                                    GIMP_RUN_INTERACTIVE,
                                    &status, NULL, &error);
 
diff --git a/app/core/gimpimagefile.c b/app/core/gimpimagefile.c
index cf079d848c..5517551b5d 100644
--- a/app/core/gimpimagefile.c
+++ b/app/core/gimpimagefile.c
@@ -488,7 +488,6 @@ gimp_imagefile_create_thumbnail (GimpImagefile  *imagefile,
            * from actual thumbnail saving
            */
           image = file_open_image (private->gimp, context, progress,
-                                   private->file,
                                    private->file,
                                    FALSE, NULL, GIMP_RUN_NONINTERACTIVE,
                                    &status, &mime_type, NULL);
diff --git a/app/dialogs/file-open-dialog.c b/app/dialogs/file-open-dialog.c
index 379cf12a72..63983b0de3 100644
--- a/app/dialogs/file-open-dialog.c
+++ b/app/dialogs/file-open-dialog.c
@@ -217,7 +217,7 @@ file_open_dialog_open_image (GtkWidget           *dialog,
   image = file_open_with_proc_and_display (gimp,
                                            gimp_get_user_context (gimp),
                                            GIMP_PROGRESS (dialog),
-                                           file, file, FALSE,
+                                           file, FALSE,
                                            load_proc,
                                            G_OBJECT (gimp_widget_get_monitor (dialog)),
                                            &status, &error);
diff --git a/app/dialogs/file-open-location-dialog.c b/app/dialogs/file-open-location-dialog.c
index f0baa4e0ef..d5c710e8ac 100644
--- a/app/dialogs/file-open-location-dialog.c
+++ b/app/dialogs/file-open-location-dialog.c
@@ -196,12 +196,6 @@ file_open_location_response (GtkDialog *dialog,
 
       if (file)
         {
-          GFile *entered_file = g_file_new_for_uri (text);
-
-          /* should not fail but does, see issue #3093 */
-          if (! entered_file)
-            entered_file = g_object_ref (file);
-
           gtk_widget_show (box);
 
           gtk_editable_set_editable (GTK_EDITABLE (entry), FALSE);
@@ -210,16 +204,13 @@ file_open_location_response (GtkDialog *dialog,
           image = file_open_with_proc_and_display (gimp,
                                                    gimp_get_user_context (gimp),
                                                    GIMP_PROGRESS (box),
-                                                   file, entered_file,
-                                                   FALSE, NULL,
+                                                   file, FALSE, NULL,
                                                    G_OBJECT (gimp_widget_get_monitor (entry)),
                                                    &status, &error);
 
           gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, TRUE);
           gtk_editable_set_editable (GTK_EDITABLE (entry), TRUE);
 
-          g_object_unref (entered_file);
-
           if (image == NULL && status != GIMP_PDB_CANCEL)
             {
               gimp_message (gimp, G_OBJECT (box), GIMP_MESSAGE_ERROR,
diff --git a/app/file-data/file-data.c b/app/file-data/file-data.c
index 12855796a5..bfad944b89 100644
--- a/app/file-data/file-data.c
+++ b/app/file-data/file-data.c
@@ -96,14 +96,6 @@ file_data_init (Gimp *gimp)
                                                        TRUE, FALSE, TRUE,
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_string ("raw-uri",
-                                                       "Raw URI",
-                                                       "The URI of the file "
-                                                       "to load",
-                                                       TRUE, FALSE, TRUE,
-                                                       NULL,
-                                                       GIMP_PARAM_READWRITE));
 
   gimp_procedure_add_return_value (procedure,
                                    gimp_param_spec_image ("image",
@@ -177,14 +169,6 @@ file_data_init (Gimp *gimp)
                                                        FALSE, FALSE, TRUE,
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_string ("raw-uri",
-                                                       "Raw URI",
-                                                       "The URI of the file "
-                                                       "to export",
-                                                       FALSE, FALSE, TRUE,
-                                                       NULL,
-                                                       GIMP_PARAM_READWRITE));
   gimp_procedure_add_argument (procedure,
                                g_param_spec_int ("spacing",
                                                  "spacing",
@@ -248,14 +232,6 @@ file_data_init (Gimp *gimp)
                                                        TRUE, FALSE, TRUE,
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_string ("raw-uri",
-                                                       "Raw URI",
-                                                       "The URI of the file "
-                                                       "to load",
-                                                       TRUE, FALSE, TRUE,
-                                                       NULL,
-                                                       GIMP_PARAM_READWRITE));
 
   gimp_procedure_add_return_value (procedure,
                                    gimp_param_spec_image ("image",
@@ -329,14 +305,6 @@ file_data_init (Gimp *gimp)
                                                        FALSE, FALSE, TRUE,
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_string ("raw-uri",
-                                                       "Raw URI",
-                                                       "The URI of the file "
-                                                       "to export",
-                                                       FALSE, FALSE, TRUE,
-                                                       NULL,
-                                                       GIMP_PARAM_READWRITE));
   gimp_procedure_add_argument (procedure,
                                g_param_spec_int ("spacing",
                                                  "spacing",
@@ -407,14 +375,6 @@ file_data_init (Gimp *gimp)
                                                        TRUE, FALSE, TRUE,
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_string ("raw-uri",
-                                                       "Raw URI",
-                                                       "The URI of the file "
-                                                       "to load",
-                                                       TRUE, FALSE, TRUE,
-                                                       NULL,
-                                                       GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
                                    gimp_param_spec_image ("image",
                                                           "Image",
@@ -487,14 +447,6 @@ file_data_init (Gimp *gimp)
                                                        FALSE, FALSE, TRUE,
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_string ("raw-uri",
-                                                       "Raw URI",
-                                                       "The URI of the file "
-                                                       "to export",
-                                                       FALSE, FALSE, TRUE,
-                                                       NULL,
-                                                       GIMP_PARAM_READWRITE));
 
   gimp_procedure_add_argument (procedure,
                                gimp_param_spec_string ("name",
@@ -551,14 +503,6 @@ file_data_init (Gimp *gimp)
                                                        TRUE, FALSE, TRUE,
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_string ("raw-uri",
-                                                       "Raw URI",
-                                                       "The URI of the file "
-                                                       "to load",
-                                                       TRUE, FALSE, TRUE,
-                                                       NULL,
-                                                       GIMP_PARAM_READWRITE));
 
   gimp_procedure_add_return_value (procedure,
                                    gimp_param_spec_string ("extension-id",
diff --git a/app/file/file-open.c b/app/file/file-open.c
index 09ed02db19..b41b090f57 100644
--- a/app/file/file-open.c
+++ b/app/file/file-open.c
@@ -71,7 +71,6 @@ file_open_image (Gimp                *gimp,
                  GimpContext         *context,
                  GimpProgress        *progress,
                  GFile               *file,
-                 GFile               *entered_file,
                  gboolean             as_new,
                  GimpPlugInProcedure *file_proc,
                  GimpRunMode          run_mode,
@@ -83,7 +82,6 @@ file_open_image (Gimp                *gimp,
   GimpImage      *image       = NULL;
   GFile          *local_file  = NULL;
   gchar          *uri         = NULL;
-  gchar          *entered_uri = NULL;
   gboolean        mounted     = TRUE;
   GError         *my_error    = NULL;
 
@@ -91,7 +89,6 @@ file_open_image (Gimp                *gimp,
   g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
   g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
   g_return_val_if_fail (G_IS_FILE (file), NULL);
-  g_return_val_if_fail (G_IS_FILE (entered_file), NULL);
   g_return_val_if_fail (status != NULL, NULL);
   g_return_val_if_fail (error == NULL || *error == NULL, NULL);
 
@@ -211,11 +208,6 @@ file_open_image (Gimp                *gimp,
   if (! uri)
     uri = g_file_get_uri (file);
 
-  entered_uri = g_file_get_uri (entered_file);
-
-  if (! entered_uri)
-    entered_uri = g_strdup (uri);
-
   if (progress)
     g_object_add_weak_pointer (G_OBJECT (progress), (gpointer) &progress);
 
@@ -225,14 +217,12 @@ file_open_image (Gimp                *gimp,
                                         gimp_object_get_name (file_proc),
                                         GIMP_TYPE_RUN_MODE, run_mode,
                                         G_TYPE_STRING,      uri,
-                                        G_TYPE_STRING,      entered_uri,
                                         G_TYPE_NONE);
 
   if (progress)
     g_object_remove_weak_pointer (G_OBJECT (progress), (gpointer) &progress);
 
   g_free (uri);
-  g_free (entered_uri);
 
   *status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
 
@@ -489,7 +479,7 @@ file_open_with_display (Gimp               *gimp,
                         GError            **error)
 {
   return file_open_with_proc_and_display (gimp, context, progress,
-                                          file, file, as_new, NULL,
+                                          file, as_new, NULL,
                                           monitor,
                                           status, error);
 }
@@ -499,7 +489,6 @@ file_open_with_proc_and_display (Gimp                *gimp,
                                  GimpContext         *context,
                                  GimpProgress        *progress,
                                  GFile               *file,
-                                 GFile               *entered_file,
                                  gboolean             as_new,
                                  GimpPlugInProcedure *file_proc,
                                  GObject             *monitor,
@@ -513,13 +502,11 @@ file_open_with_proc_and_display (Gimp                *gimp,
   g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
   g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
   g_return_val_if_fail (G_IS_FILE (file), NULL);
-  g_return_val_if_fail (G_IS_FILE (entered_file), NULL);
   g_return_val_if_fail (monitor == NULL || G_IS_OBJECT (monitor), NULL);
   g_return_val_if_fail (status != NULL, NULL);
 
   image = file_open_image (gimp, context, progress,
                            file,
-                           entered_file,
                            as_new,
                            file_proc,
                            GIMP_RUN_INTERACTIVE,
@@ -619,7 +606,7 @@ file_open_layers (Gimp                *gimp,
   g_return_val_if_fail (error == NULL || *error == NULL, NULL);
 
   new_image = file_open_image (gimp, context, progress,
-                               file, file, FALSE,
+                               file, FALSE,
                                file_proc,
                                run_mode,
                                status, &mime_type, error);
diff --git a/app/file/file-open.h b/app/file/file-open.h
index 627bd4a1e1..e67281adac 100644
--- a/app/file/file-open.h
+++ b/app/file/file-open.h
@@ -25,7 +25,6 @@ GimpImage * file_open_image                 (Gimp                *gimp,
                                              GimpContext         *context,
                                              GimpProgress        *progress,
                                              GFile               *file,
-                                             GFile               *entered_file,
                                              gboolean             as_new,
                                              GimpPlugInProcedure *file_proc,
                                              GimpRunMode          run_mode,
@@ -57,7 +56,6 @@ GimpImage * file_open_with_proc_and_display (Gimp                *gimp,
                                              GimpContext         *context,
                                              GimpProgress        *progress,
                                              GFile               *file,
-                                             GFile               *entered_file,
                                              gboolean             as_new,
                                              GimpPlugInProcedure *file_proc,
                                              GObject             *monitor,
diff --git a/app/file/file-save.c b/app/file/file-save.c
index e8b985a0c3..e6eb6b5a04 100644
--- a/app/file/file-save.c
+++ b/app/file/file-save.c
@@ -195,7 +195,6 @@ file_save (Gimp                *gimp,
                                         GIMP_TYPE_IMAGE,    image,
                                         GIMP_TYPE_DRAWABLE, drawable,
                                         G_TYPE_STRING,      uri,
-                                        G_TYPE_STRING,      uri,
                                         G_TYPE_NONE);
 
   status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
diff --git a/app/pdb/file-cmds.c b/app/pdb/file-cmds.c
index f47f103a5d..442d9d9a0d 100644
--- a/app/pdb/file-cmds.c
+++ b/app/pdb/file-cmds.c
@@ -88,10 +88,7 @@ file_load_invoker (GimpProcedure         *procedure,
   g_value_take_string (gimp_value_array_index (new_args, 1),
                        g_file_get_uri (file));
 
-  g_value_transform (gimp_value_array_index (args, 2),
-                     gimp_value_array_index (new_args, 2));
-
-  for (i = 3; i < proc->num_args; i++)
+  for (i = 2; i < proc->num_args; i++)
     if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
       g_value_set_static_string (gimp_value_array_index (new_args, i), "");
 
@@ -301,10 +298,7 @@ file_save_invoker (GimpProcedure         *procedure,
   g_value_take_string (gimp_value_array_index (new_args, 3),
                        g_file_get_uri (file));
 
-  g_value_transform (gimp_value_array_index (args, 4),
-                     gimp_value_array_index (new_args, 4));
-
-  for (i = 5; i < proc->num_args; i++)
+  for (i = 4; i < proc->num_args; i++)
     if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
       g_value_set_static_string (gimp_value_array_index (new_args, i), "");
 
@@ -430,13 +424,6 @@ register_file_procs (GimpPDB *pdb)
                                                        TRUE, FALSE, FALSE,
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_string ("raw-filename",
-                                                       "raw filename",
-                                                       "The name as entered by the user",
-                                                       TRUE, FALSE, FALSE,
-                                                       NULL,
-                                                       GIMP_PARAM_READWRITE));
   gimp_procedure_add_return_value (procedure,
                                    gimp_param_spec_image ("image",
                                                           "image",
@@ -582,13 +569,6 @@ register_file_procs (GimpPDB *pdb)
                                                        TRUE, FALSE, FALSE,
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_string ("raw-filename",
-                                                       "raw filename",
-                                                       "The name as entered by the user",
-                                                       TRUE, FALSE, FALSE,
-                                                       NULL,
-                                                       GIMP_PARAM_READWRITE));
   gimp_pdb_register_procedure (pdb, procedure);
   g_object_unref (procedure);
 
diff --git a/app/plug-in/gimpplugin-proc.c b/app/plug-in/gimpplugin-proc.c
index 8614f8a47e..49bd680ac6 100644
--- a/app/plug-in/gimpplugin-proc.c
+++ b/app/plug-in/gimpplugin-proc.c
@@ -291,17 +291,23 @@ gimp_plug_in_set_file_proc_load_handler (GimpPlugIn   *plug_in,
 
   procedure = GIMP_PROCEDURE (proc);
 
-  if (((procedure->num_args   < 3)                        ||
+  if (((procedure->num_args   < 2)                        ||
        (procedure->num_values < 1)                        ||
        ! 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]) ||
        (! proc->generic_file_proc &&
         ! GIMP_IS_PARAM_SPEC_IMAGE (procedure->values[0]))))
     {
       g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_FAILED,
-                   "load handler \"%s\" does not take the standard "
-                   "load handler args", proc_name);
+                   "Plug-in \"%s\"\n(%s)\n"
+                   "attempted to register procedure \"%s\" "
+                   "as load handler which does not take the standard "
+                   "load procedure arguments: "
+                   "(GimpRunMode, String) -> (GimpImage)",
+                   gimp_object_get_name (plug_in),
+                   gimp_file_get_utf8_name (plug_in->file),
+                   proc_name);
+
       return FALSE;
     }
 
@@ -344,16 +350,22 @@ gimp_plug_in_set_file_proc_save_handler (GimpPlugIn   *plug_in,
 
   procedure = GIMP_PROCEDURE (proc);
 
-  if ((procedure->num_args < 5)                          ||
+  if ((procedure->num_args < 4)                          ||
       ! 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]))
+      ! G_IS_PARAM_SPEC_STRING      (procedure->args[3]))
     {
       g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_FAILED,
-                   "save handler \"%s\" does not take the standard "
-                   "save handler args", proc_name);
+                   "Plug-in \"%s\"\n(%s)\n"
+                   "attempted to register procedure \"%s\" "
+                   "as save handler which does not take the standard "
+                   "save procedure arguments: "
+                   "(GimpRunMode, GimpImage, GimpDrawable, String)",
+                   gimp_object_get_name (plug_in),
+                   gimp_file_get_utf8_name (plug_in->file),
+                   proc_name);
+
       return FALSE;
     }
 
diff --git a/app/plug-in/gimppluginprocedure.c b/app/plug-in/gimppluginprocedure.c
index a81011e6be..39ff34d6ea 100644
--- a/app/plug-in/gimppluginprocedure.c
+++ b/app/plug-in/gimppluginprocedure.c
@@ -453,7 +453,6 @@ gimp_plug_in_procedure_validate_args (GimpPlugInProcedure *proc,
       (procedure->num_values >= 1)                     &&
       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]) &&
       GIMP_IS_PARAM_SPEC_IMAGE    (procedure->values[0]))
     {
       uri_value = gimp_value_array_index (args, 1);
@@ -462,8 +461,7 @@ gimp_plug_in_procedure_validate_args (GimpPlugInProcedure *proc,
            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]))
+           G_IS_PARAM_SPEC_STRING      (procedure->args[3]))
     {
       uri_value = gimp_value_array_index (args, 3);
     }
diff --git a/app/xcf/xcf.c b/app/xcf/xcf.c
index 550e566bfd..b858162232 100644
--- a/app/xcf/xcf.c
+++ b/app/xcf/xcf.c
@@ -164,14 +164,6 @@ xcf_init (Gimp *gimp)
                                                        TRUE, FALSE, TRUE,
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_string ("raw-filename",
-                                                       "Raw filename",
-                                                       "The basename of the "
-                                                       "file, in UTF-8",
-                                                       FALSE, FALSE, TRUE,
-                                                       NULL,
-                                                       GIMP_PARAM_READWRITE));
   gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc);
   g_object_unref (procedure);
 
@@ -226,14 +218,6 @@ xcf_init (Gimp *gimp)
                                                        TRUE, FALSE, TRUE,
                                                        NULL,
                                                        GIMP_PARAM_READWRITE));
-  gimp_procedure_add_argument (procedure,
-                               gimp_param_spec_string ("raw-filename",
-                                                       "Raw filename",
-                                                       "The basename of the "
-                                                       "file, in UTF-8",
-                                                       FALSE, FALSE, TRUE,
-                                                       NULL,
-                                                       GIMP_PARAM_READWRITE));
 
   gimp_procedure_add_return_value (procedure,
                                    gimp_param_spec_image ("image",
diff --git a/libgimp/gimpfile_pdb.c b/libgimp/gimpfile_pdb.c
index be2fa66115..5278cd7a0d 100644
--- a/libgimp/gimpfile_pdb.c
+++ b/libgimp/gimpfile_pdb.c
@@ -38,7 +38,6 @@
  * gimp_file_load:
  * @run_mode: The run mode.
  * @filename: The name of the file to load.
- * @raw_filename: The name as entered by the user.
  *
  * Loads an image file by invoking the right load handler.
  *
@@ -54,8 +53,7 @@
  **/
 GimpImage *
 gimp_file_load (GimpRunMode  run_mode,
-                const gchar *filename,
-                const gchar *raw_filename)
+                const gchar *filename)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -64,7 +62,6 @@ gimp_file_load (GimpRunMode  run_mode,
   args = gimp_value_array_new_from_types (NULL,
                                           GIMP_TYPE_RUN_MODE, run_mode,
                                           G_TYPE_STRING, filename,
-                                          G_TYPE_STRING, raw_filename,
                                           G_TYPE_NONE);
 
   return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
@@ -185,7 +182,6 @@ gimp_file_load_layers (GimpRunMode  run_mode,
  * @image: Input image.
  * @drawable: Drawable to save.
  * @filename: The name of the file to save the image in.
- * @raw_filename: The name as entered by the user.
  *
  * Saves a file by extension.
  *
@@ -203,8 +199,7 @@ gboolean
 gimp_file_save (GimpRunMode   run_mode,
                 GimpImage    *image,
                 GimpDrawable *drawable,
-                const gchar  *filename,
-                const gchar  *raw_filename)
+                const gchar  *filename)
 {
   GimpValueArray *args;
   GimpValueArray *return_vals;
@@ -215,7 +210,6 @@ gimp_file_save (GimpRunMode   run_mode,
                                           GIMP_TYPE_IMAGE, image,
                                           GIMP_TYPE_DRAWABLE, drawable,
                                           G_TYPE_STRING, filename,
-                                          G_TYPE_STRING, raw_filename,
                                           G_TYPE_NONE);
 
   return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
diff --git a/libgimp/gimpfile_pdb.h b/libgimp/gimpfile_pdb.h
index 18dddbb6df..2139ecacee 100644
--- a/libgimp/gimpfile_pdb.h
+++ b/libgimp/gimpfile_pdb.h
@@ -33,8 +33,7 @@ G_BEGIN_DECLS
 
 
 GimpImage*  gimp_file_load           (GimpRunMode   run_mode,
-                                      const gchar  *filename,
-                                      const gchar  *raw_filename);
+                                      const gchar  *filename);
 GimpLayer*  gimp_file_load_layer     (GimpRunMode   run_mode,
                                       GimpImage    *image,
                                       const gchar  *filename);
@@ -45,8 +44,7 @@ GimpLayer** gimp_file_load_layers    (GimpRunMode   run_mode,
 gboolean    gimp_file_save           (GimpRunMode   run_mode,
                                       GimpImage    *image,
                                       GimpDrawable *drawable,
-                                      const gchar  *filename,
-                                      const gchar  *raw_filename);
+                                      const gchar  *filename);
 gboolean    gimp_file_save_thumbnail (GimpImage    *image,
                                       const gchar  *filename);
 
diff --git a/libgimp/gimploadprocedure.c b/libgimp/gimploadprocedure.c
index c4f6ede306..6f139e74ec 100644
--- a/libgimp/gimploadprocedure.c
+++ b/libgimp/gimploadprocedure.c
@@ -84,12 +84,6 @@ gimp_load_procedure_constructed (GObject *object)
                         NULL,
                         GIMP_PARAM_READWRITE);
 
-  GIMP_PROC_ARG_STRING (procedure, "raw-uri",
-                        "Raw URI",
-                        "The URI of the file to load",
-                        NULL,
-                        GIMP_PARAM_READWRITE);
-
   GIMP_PROC_VAL_IMAGE (procedure, "image",
                        "Image",
                        "Output image",
@@ -160,13 +154,12 @@ gimp_load_procedure_run (GimpProcedure        *procedure,
 
   run_mode   = GIMP_VALUES_GET_ENUM   (args, 0);
   uri        = GIMP_VALUES_GET_STRING (args, 1);
-  /* raw_uri = GIMP_VALUES_GET_STRING (args, 2); */
 
   file = g_file_new_for_uri (uri);
 
-  remaining = gimp_value_array_new (gimp_value_array_length (args) - 3);
+  remaining = gimp_value_array_new (gimp_value_array_length (args) - 2);
 
-  for (i = 3; i < gimp_value_array_length (args); i++)
+  for (i = 2; i < gimp_value_array_length (args); i++)
     {
       GValue *value = gimp_value_array_index (args, i);
 
@@ -207,7 +200,7 @@ gimp_load_procedure_run (GimpProcedure        *procedure,
  *
  * It automatically adds the standard
  *
- * (run-mode, uri, raw-uri)
+ * (run-mode, uri)
  *
  * arguments and the standard
  *
diff --git a/libgimp/gimpsaveprocedure.c b/libgimp/gimpsaveprocedure.c
index f73d06db58..60fbf514f9 100644
--- a/libgimp/gimpsaveprocedure.c
+++ b/libgimp/gimpsaveprocedure.c
@@ -92,12 +92,6 @@ gimp_save_procedure_constructed (GObject *object)
                         "The URI of the file to save to",
                         NULL,
                         GIMP_PARAM_READWRITE);
-
-  GIMP_PROC_ARG_STRING (procedure, "raw-uri",
-                        "Raw URI",
-                        "The URI of the file to save to",
-                        NULL,
-                        GIMP_PARAM_READWRITE);
 }
 
 static void
@@ -156,13 +150,12 @@ gimp_save_procedure_run (GimpProcedure        *procedure,
   image      = GIMP_VALUES_GET_IMAGE    (args, 1);
   drawable   = GIMP_VALUES_GET_DRAWABLE (args, 2);
   uri        = GIMP_VALUES_GET_STRING   (args, 3);
-  /* raw_uri = GIMP_VALUES_GET_STRING   (args, 4); */
 
   file = g_file_new_for_uri (uri);
 
-  remaining = gimp_value_array_new (gimp_value_array_length (args) - 5);
+  remaining = gimp_value_array_new (gimp_value_array_length (args) - 4);
 
-  for (i = 5; i < gimp_value_array_length (args); i++)
+  for (i = 4; i < gimp_value_array_length (args); i++)
     {
       GValue *value = gimp_value_array_index (args, i);
 
@@ -204,7 +197,7 @@ gimp_save_procedure_run (GimpProcedure        *procedure,
  *
  * It automatically adds the standard
  *
- * (run-mode, image-id, drawable-id, uri, raw-uri)
+ * (run-mode, image-id, drawable-id, uri)
  *
  * arguments of a save procedure. It is possible to add additional
  * arguments.
diff --git a/pdb/groups/file.pdb b/pdb/groups/file.pdb
index 45f35b1fd6..8692f1c263 100644
--- a/pdb/groups/file.pdb
+++ b/pdb/groups/file.pdb
@@ -37,9 +37,7 @@ HELP
           type => 'enum GimpRunMode (no GIMP_RUN_WITH_LAST_VALS)',
           desc => 'The run mode' },
         { name => 'filename', type => 'string', allow_non_utf8 => 1,
-          desc => 'The name of the file to load' },
-        { name => 'raw_filename', type => 'string', allow_non_utf8 => 1,
-          desc => 'The name as entered by the user' }
+          desc => 'The name of the file to load' }
     );
 
     @outargs = (
@@ -88,10 +86,7 @@ HELP
   g_value_take_string (gimp_value_array_index (new_args, 1),
                        g_file_get_uri (file));
 
-  g_value_transform (gimp_value_array_index (args, 2),
-                     gimp_value_array_index (new_args, 2));
-
-  for (i = 3; i < proc->num_args; i++)
+  for (i = 2; i < proc->num_args; i++)
     if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
       g_value_set_static_string (gimp_value_array_index (new_args, i), "");
 
@@ -274,9 +269,7 @@ HELP
         { name => 'drawable', type => 'drawable',
           desc => 'Drawable to save' },
         { name => 'filename', type => 'string', allow_non_utf8 => 1,
-          desc => 'The name of the file to save the image in' },
-        { name => 'raw_filename', type => 'string', allow_non_utf8 => 1,
-          desc => 'The name as entered by the user' }
+          desc => 'The name of the file to save the image in' }
     );
 
     %invoke = (
@@ -330,10 +323,7 @@ HELP
   g_value_take_string (gimp_value_array_index (new_args, 3),
                        g_file_get_uri (file));
 
-  g_value_transform (gimp_value_array_index (args, 4),
-                     gimp_value_array_index (new_args, 4));
-
-  for (i = 5; i < proc->num_args; i++)
+  for (i = 4; i < proc->num_args; i++)
     if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
       g_value_set_static_string (gimp_value_array_index (new_args, i), "");
 
diff --git a/plug-ins/common/file-compressor.c b/plug-ins/common/file-compressor.c
index 8059afcc41..bc7899714d 100644
--- a/plug-ins/common/file-compressor.c
+++ b/plug-ins/common/file-compressor.c
@@ -450,7 +450,6 @@ save_image (const CompressorEntry  *compressor,
   if (! (gimp_file_save (run_mode,
                          image,
                          drawable,
-                         tmpname,
                          tmpname) && valid_file (tmpname)))
     {
       g_unlink (tmpname);
@@ -516,7 +515,7 @@ load_image (const CompressorEntry  *compressor,
 
   /* now that we uncompressed it, load the temp file */
 
-  image = gimp_file_load (run_mode, tmpname, tmpname);
+  image = gimp_file_load (run_mode, tmpname);
 
   g_unlink (tmpname);
   g_free (tmpname);
diff --git a/plug-ins/common/file-desktop-link.c b/plug-ins/common/file-desktop-link.c
index a6bd22036a..7c41dffac0 100644
--- a/plug-ins/common/file-desktop-link.c
+++ b/plug-ins/common/file-desktop-link.c
@@ -187,7 +187,7 @@ load_image (GFile        *file,
   value = g_key_file_get_value (key_file,
                                 group, G_KEY_FILE_DESKTOP_KEY_URL, &error);
   if (value)
-    image = gimp_file_load (run_mode, value, value);
+    image = gimp_file_load (run_mode, value);
 
  out:
   if (error)
diff --git a/plug-ins/common/file-gbr.c b/plug-ins/common/file-gbr.c
index cc9eb1a31e..ec3dc3ba8e 100644
--- a/plug-ins/common/file-gbr.c
+++ b/plug-ins/common/file-gbr.c
@@ -273,7 +273,6 @@ gbr_save (GimpProcedure        *procedure,
                                 GIMP_TYPE_IMAGE,    image,
                                 GIMP_TYPE_DRAWABLE, drawable,
                                 G_TYPE_STRING,      uri,
-                                G_TYPE_STRING,      uri,
                                 G_TYPE_INT,         info.spacing,
                                 G_TYPE_STRING,      info.description,
                                 G_TYPE_NONE);
diff --git a/plug-ins/common/file-gih.c b/plug-ins/common/file-gih.c
index 8062dbd981..142e03508a 100644
--- a/plug-ins/common/file-gih.c
+++ b/plug-ins/common/file-gih.c
@@ -431,7 +431,6 @@ gih_save (GimpProcedure        *procedure,
                                 GIMP_TYPE_IMAGE,    image,
                                 GIMP_TYPE_DRAWABLE, drawable,
                                 G_TYPE_STRING,      uri,
-                                G_TYPE_STRING,      uri,
                                 G_TYPE_INT,         info.spacing,
                                 G_TYPE_STRING,      info.description,
                                 G_TYPE_STRING,      paramstring,
diff --git a/plug-ins/common/file-pat.c b/plug-ins/common/file-pat.c
index 424214a2b4..bb1ee70656 100644
--- a/plug-ins/common/file-pat.c
+++ b/plug-ins/common/file-pat.c
@@ -236,7 +236,6 @@ pat_save (GimpProcedure        *procedure,
                                 GIMP_TYPE_IMAGE,    image,
                                 GIMP_TYPE_DRAWABLE, drawable,
                                 G_TYPE_STRING,      uri,
-                                G_TYPE_STRING,      uri,
                                 G_TYPE_STRING,      description,
                                 G_TYPE_NONE);
 
diff --git a/plug-ins/common/mail.c b/plug-ins/common/mail.c
index aba836c7fb..56e6062b47 100644
--- a/plug-ins/common/mail.c
+++ b/plug-ins/common/mail.c
@@ -353,7 +353,6 @@ send_image (const gchar  *filename,
   if (! (gimp_file_save (run_mode,
                          image,
                          drawable,
-                         tmpname,
                          tmpname) && valid_file (tmpname)))
     {
       goto error;
diff --git a/plug-ins/file-raw/file-darktable.c b/plug-ins/file-raw/file-darktable.c
index 651afe11e8..4ccd592b83 100644
--- a/plug-ins/file-raw/file-darktable.c
+++ b/plug-ins/file-raw/file-darktable.c
@@ -444,7 +444,7 @@ load_image (const gchar  *filename,
                     NULL,
                     error))
     {
-      image = gimp_file_load (run_mode, filename_out, filename_out);
+      image = gimp_file_load (run_mode, filename_out);
       if (image)
         gimp_image_set_filename (image, filename);
     }
@@ -535,9 +535,7 @@ load_thumbnail_image (const gchar   *filename,
     {
       gimp_progress_update (0.5);
 
-      image = gimp_file_load (GIMP_RUN_NONINTERACTIVE,
-                              filename_out,
-                              filename_out);
+      image = gimp_file_load (GIMP_RUN_NONINTERACTIVE, filename_out);
       if (image)
         {
           /* the size reported by raw files isn't precise,
diff --git a/plug-ins/file-raw/file-rawtherapee.c b/plug-ins/file-raw/file-rawtherapee.c
index 55fa634e07..83251e1124 100644
--- a/plug-ins/file-raw/file-rawtherapee.c
+++ b/plug-ins/file-raw/file-rawtherapee.c
@@ -362,7 +362,7 @@ load_image (const gchar  *filename,
                     NULL,
                     error))
     {
-      image = gimp_file_load (run_mode, filename_out, filename_out);
+      image = gimp_file_load (run_mode, filename_out);
       if (image)
         gimp_image_set_filename (image, filename);
     }
@@ -481,9 +481,7 @@ load_thumbnail_image (const gchar   *filename,
     {
       gimp_progress_update (0.5);
 
-      image = gimp_file_load (GIMP_RUN_NONINTERACTIVE,
-                              filename_out,
-                              filename_out);
+      image = gimp_file_load (GIMP_RUN_NONINTERACTIVE, filename_out);
       if (image)
         {
           /* is this needed for thumbnails? */
diff --git a/plug-ins/screenshot/screenshot-freedesktop.c b/plug-ins/screenshot/screenshot-freedesktop.c
index 35aa27d256..87b35aec67 100644
--- a/plug-ins/screenshot/screenshot-freedesktop.c
+++ b/plug-ins/screenshot/screenshot-freedesktop.c
@@ -103,8 +103,7 @@ screenshot_freedesktop_dbus_signal (GDBusProxy  *proxy,
               GFile *file = g_file_new_for_uri (uri);
               gchar *path = g_file_get_path (file);
 
-              *image = gimp_file_load (GIMP_RUN_NONINTERACTIVE,
-                                       path, path);
+              *image = gimp_file_load (GIMP_RUN_NONINTERACTIVE, path);
               gimp_image_set_filename (*image, "screenshot.png");
 
               /* Delete the actual file. */
diff --git a/plug-ins/screenshot/screenshot-gnome-shell.c b/plug-ins/screenshot/screenshot-gnome-shell.c
index e189e81e8e..a594f37e7c 100644
--- a/plug-ins/screenshot/screenshot-gnome-shell.c
+++ b/plug-ins/screenshot/screenshot-gnome-shell.c
@@ -176,8 +176,7 @@ screenshot_gnome_shell_shoot (ScreenshotValues  *shootvals,
     {
       GimpColorProfile *profile;
 
-      *image = gimp_file_load (GIMP_RUN_NONINTERACTIVE,
-                                  filename, filename);
+      *image = gimp_file_load (GIMP_RUN_NONINTERACTIVE, filename);
       gimp_image_set_filename (*image, "screenshot.png");
 
       profile = gimp_monitor_get_color_profile (monitor);
diff --git a/plug-ins/screenshot/screenshot-kwin.c b/plug-ins/screenshot/screenshot-kwin.c
index 0a53bce50f..455e272cf0 100644
--- a/plug-ins/screenshot/screenshot-kwin.c
+++ b/plug-ins/screenshot/screenshot-kwin.c
@@ -168,8 +168,7 @@ screenshot_kwin_shoot (ScreenshotValues  *shootvals,
     {
       GimpColorProfile *profile;
 
-      *image = gimp_file_load (GIMP_RUN_NONINTERACTIVE,
-                                  filename, filename);
+      *image = gimp_file_load (GIMP_RUN_NONINTERACTIVE, filename);
       gimp_image_set_filename (*image, "screenshot.png");
 
       /* This is very wrong in multi-display setups since we have no



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