plug-ins: add missing error message when TWAIN driver isn't found

There was no user feedback when our twain plug-in couldn't find the
(32-bit) TWAIN driver, making for a poor user experience.

Especially since nowadays the availability of the twain driver is
less likely, let's add an error message for the user, so they will
know what's going on.
This commit is contained in:
Jacob Boerema 2024-04-16 15:09:27 -04:00
parent 956a9fac6c
commit f574dc7f0f
1 changed files with 5 additions and 1 deletions

View File

@ -414,8 +414,12 @@ twain_run (GimpProcedure *procedure,
*/
if (! twainIsAvailable ())
{
GError *error = NULL;
g_set_error (&error, GIMP_PLUG_IN_ERROR, 0,
_("TWAIN driver not found, scanning not available"));
return gimp_procedure_new_return_values (procedure, GIMP_PDB_EXECUTION_ERROR,
NULL);
error);
}
if (run_mode == GIMP_RUN_NONINTERACTIVE)