From dababa26d6713c8e526c2f635f60ce2554dcb5c9 Mon Sep 17 00:00:00 2001 From: Jehan Date: Tue, 7 Apr 2026 20:13:31 +0200 Subject: [PATCH] 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. --- app/pdb/gimp-cmds.c | 8 +++++++- pdb/groups/gimp.pdb | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/pdb/gimp-cmds.c b/app/pdb/gimp-cmds.c index cf1d87ec75..02af8307a0 100644 --- a/app/pdb/gimp-cmds.c +++ b/app/pdb/gimp-cmds.c @@ -292,12 +292,18 @@ register_gimp_procs (GimpPDB *pdb) "gimp-quit"); gimp_procedure_set_static_help (procedure, "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); gimp_procedure_set_static_attribution (procedure, "Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis", "1995-1996"); + gimp_procedure_set_deprecated (procedure, + "NONE"); gimp_procedure_add_argument (procedure, g_param_spec_boolean ("force", "force", diff --git a/pdb/groups/gimp.pdb b/pdb/groups/gimp.pdb index 18ec4eb980..0a36b4c2fe 100644 --- a/pdb/groups/gimp.pdb +++ b/pdb/groups/gimp.pdb @@ -71,10 +71,19 @@ sub quit { 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. + + +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 &std_pdb_misc; + $deprecated = 'NONE'; + $deprecated_since = '3.2.4'; + @inargs = ( { name => 'force', type => 'boolean', desc => 'Force GIMP to quit without asking' }