From f574dc7f0f202962ad0dd0586aed7ae6202070b9 Mon Sep 17 00:00:00 2001 From: Jacob Boerema Date: Tue, 16 Apr 2024 15:09:27 -0400 Subject: [PATCH] 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. --- plug-ins/twain/twain.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plug-ins/twain/twain.c b/plug-ins/twain/twain.c index 5e23829dba..c18873cde3 100644 --- a/plug-ins/twain/twain.c +++ b/plug-ins/twain/twain.c @@ -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)