1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-05 21:02:42 +02:00

app, pdb: similar to the previous commit, but for files loaded with…

… gimp_file_load().

We make sure that the load procedure associated to the file is the one
used for the inner-file (in case of imbricated files into container
formats).

Also let's set the imported file unless it's a XCF inner format.
This commit is contained in:
Jehan
2025-09-29 17:28:33 +02:00
parent bb9d8df855
commit f4a7da1ee3
2 changed files with 20 additions and 2 deletions

View File

@@ -112,7 +112,16 @@ file_load_invoker (GimpProcedure *procedure,
{
GimpImage *image =
g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_image_set_load_proc (image, file_proc);
if (! gimp_image_get_load_proc (image))
/* Leave the initial load procedure if it already exists as
* it will give information about the source format. See
* similar code in file_open_image().
*/
gimp_image_set_load_proc (image, file_proc);
if (! gimp_image_get_file (image))
gimp_image_set_imported_file (image, file);
}
}

View File

@@ -104,7 +104,16 @@ HELP
{
GimpImage *image =
g_value_get_object (gimp_value_array_index (return_vals, 1));
gimp_image_set_load_proc (image, file_proc);
if (! gimp_image_get_load_proc (image))
/* Leave the initial load procedure if it already exists as
* it will give information about the source format. See
* similar code in file_open_image().
*/
gimp_image_set_load_proc (image, file_proc);
if (! gimp_image_get_file (image))
gimp_image_set_imported_file (image, file);
}
}