app, pdb: (gimp-quit) PDB procedure is also deprecated.

Even the fact we have a libgimp gimp_quit() function which was not
calling the PDB proc of the same name (and indeed doing something
differently) was weird and confusing.

Anyway we should not allow random plug-ins to basically kill GIMP
without any way to do anything about it, and probably lose all your
unsaved work. This is just wrong IMO.
We'll see if anyone wants to disagree, since anyway this won't be
removed until GIMP 4.
This commit is contained in:
Jehan 2026-04-07 20:13:31 +02:00
parent 309f137ae0
commit dababa26d6
2 changed files with 16 additions and 1 deletions

View file

@ -292,12 +292,18 @@ register_gimp_procs (GimpPDB *pdb)
"gimp-quit"); "gimp-quit");
gimp_procedure_set_static_help (procedure, gimp_procedure_set_static_help (procedure,
"Causes GIMP to exit gracefully.", "Causes GIMP to exit gracefully.",
"If there are unsaved images in an interactive GIMP session, the user will be asked for confirmation. If force is TRUE, the application is quit without querying the user to save any dirty images.", "If there are unsaved images in an interactive GIMP session, the user will be asked for confirmation. If force is TRUE, the application is quit without querying the user to save any dirty images.\n"
"\n"
"This procedure is deprecated without any replacement. Scripts and plug-ins should not request the main process to exit. If you wish to run GIMP non-interactively so that it exits immediately when the batch script ends, call the executable with option `--quit`.\n"
"\n"
"Deprecated: There is no replacement for this procedure.",
NULL); NULL);
gimp_procedure_set_static_attribution (procedure, gimp_procedure_set_static_attribution (procedure,
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
"1995-1996"); "1995-1996");
gimp_procedure_set_deprecated (procedure,
"NONE");
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("force", g_param_spec_boolean ("force",
"force", "force",

View file

@ -71,10 +71,19 @@ sub quit {
If there are unsaved images in an interactive GIMP session, the user If there are unsaved images in an interactive GIMP session, the user
will be asked for confirmation. If force is TRUE, the application is will be asked for confirmation. If force is TRUE, the application is
quit without querying the user to save any dirty images. quit without querying the user to save any dirty images.
This procedure is deprecated without any replacement. Scripts and
plug-ins should not request the main process to exit. If you wish to run
GIMP non-interactively so that it exits immediately when the batch
script ends, call the executable with option `--quit`.
HELP HELP
&std_pdb_misc; &std_pdb_misc;
$deprecated = 'NONE';
$deprecated_since = '3.2.4';
@inargs = ( @inargs = (
{ name => 'force', type => 'boolean', { name => 'force', type => 'boolean',
desc => 'Force GIMP to quit without asking' } desc => 'Force GIMP to quit without asking' }