Updated with upstream update

This commit is contained in:
2023-10-30 15:55:30 -07:00
parent 098531073c
commit 3bbdd873ef
584 changed files with 91827 additions and 70362 deletions

View File

@ -142,7 +142,7 @@ struct _TwainClass
#define TWAIN_TYPE (twain_get_type ())
#define TWAIN (obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TWAIN_TYPE, Twain))
#define TWAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TWAIN_TYPE, Twain))
GType twain_get_type (void) G_GNUC_CONST;
@ -155,7 +155,7 @@ static PikaValueArray * twain_run (PikaProcedure *procedure,
PikaImage *image,
gint n_drawables,
PikaDrawable **drawables,
const PikaValueArray *args,
PikaProcedureConfig *config,
gpointer run_data);
G_DEFINE_TYPE (Twain, twain, PIKA_TYPE_PLUG_IN)
@ -232,6 +232,7 @@ twain_create_procedure (PikaPlugIn *plug_in,
return procedure;
}
#if 0
/* Data structure holding data between runs */
/* Currently unused... Eventually may be used
* to track dialog data.
@ -257,6 +258,7 @@ static TwainValues twainvals =
0, 0,
TWPT_RGB
};
#endif
/* The standard callback functions */
TXFR_CB_FUNCS standardCbFuncs =
@ -391,7 +393,7 @@ twain_run (PikaProcedure *procedure,
PikaImage *image,
gint n_drawables,
PikaDrawable **drawables,
const PikaValueArray *args,
PikaProcedureConfig *config,
gpointer run_data)
{
/* Initialize the return values
@ -416,33 +418,11 @@ twain_run (PikaProcedure *procedure,
NULL);
}
/* How are we running today? */
switch (run_mode)
{
case PIKA_RUN_INTERACTIVE:
/* Retrieve values from the last run...
* Currently ignored
*/
pika_get_data (PLUG_IN_NAME, &twainvals);
break;
case PIKA_RUN_NONINTERACTIVE:
/* Currently, we don't do non-interactive calls.
* Bail if someone tries to call us non-interactively
*/
return pika_procedure_new_return_values (procedure, PIKA_PDB_CALLING_ERROR,
NULL);
case PIKA_RUN_WITH_LAST_VALS:
/* Retrieve values from the last run...
* Currently ignored
*/
pika_get_data (PLUG_IN_NAME, &twainvals);
break;
default:
break;
}
if (run_mode == PIKA_RUN_NONINTERACTIVE)
/* Currently, we don't do non-interactive calls.
* Bail if someone tries to call us non-interactively
*/
return pika_procedure_new_return_values (procedure, PIKA_PDB_CALLING_ERROR, NULL);
/* Have we succeeded so far? */
if (status == PIKA_PDB_SUCCESS)
@ -457,11 +437,6 @@ twain_run (PikaProcedure *procedure,
* datasource. Do final Interactive
* steps.
*/
if (run_mode == PIKA_RUN_INTERACTIVE)
{
/* Store variable states for next run */
pika_set_data (PLUG_IN_NAME, &twainvals, sizeof (TwainValues));
}
num_images = g_list_length (image_list);
images = g_new (PikaImage *, num_images);