kopia lustrzana https://gitlab.com/sane-project/frontends
Merge branch '25-xscanimage-crashes-with-test-backend' into 'master'
Resolve "xscanimage crashes with test backend" Closes #25 See merge request sane-project/frontends!4merge-requests/7/head
commit
4c234b1512
|
@ -403,10 +403,10 @@ button_update (GtkWidget * widget, GSGDialogElement * elem)
|
||||||
{
|
{
|
||||||
GSGDialog *dialog = elem->dialog;
|
GSGDialog *dialog = elem->dialog;
|
||||||
int opt_num = elem - dialog->element;
|
int opt_num = elem - dialog->element;
|
||||||
const SANE_Option_Descriptor *opt;
|
// const SANE_Option_Descriptor *opt;
|
||||||
SANE_Word val = SANE_FALSE;
|
SANE_Word val = SANE_FALSE;
|
||||||
|
|
||||||
opt = sane_get_option_descriptor (dialog->dev, opt_num);
|
// opt = sane_get_option_descriptor (dialog->dev, opt_num);
|
||||||
if (GTK_TOGGLE_BUTTON (widget)->active)
|
if (GTK_TOGGLE_BUTTON (widget)->active)
|
||||||
val = SANE_TRUE;
|
val = SANE_TRUE;
|
||||||
set_option (dialog, opt_num, &val, SANE_ACTION_SET_VALUE);
|
set_option (dialog, opt_num, &val, SANE_ACTION_SET_VALUE);
|
||||||
|
@ -1420,12 +1420,16 @@ gsg_sync (GSGDialog * dialog)
|
||||||
if (!SANE_OPTION_IS_ACTIVE (opt->cap))
|
if (!SANE_OPTION_IS_ACTIVE (opt->cap))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (opt->type != SANE_TYPE_INT && opt->type != SANE_TYPE_FIXED)
|
if ((opt->type != SANE_TYPE_INT) && (opt->type != SANE_TYPE_FIXED))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (opt->size == sizeof (SANE_Word))
|
if (opt->size == sizeof (SANE_Word))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// If curves is hidden (advanced option perhaps) then nothing to do.
|
||||||
|
if (!dialog->element[i].widget)
|
||||||
|
continue;
|
||||||
|
|
||||||
/* ok, we're dealing with an active vector */
|
/* ok, we're dealing with an active vector */
|
||||||
|
|
||||||
optlen = opt->size / sizeof (SANE_Word);
|
optlen = opt->size / sizeof (SANE_Word);
|
||||||
|
|
|
@ -1709,6 +1709,7 @@ List of available devices:", prog_name);
|
||||||
|
|
||||||
sane_cancel (device);
|
sane_cancel (device);
|
||||||
sane_close (device);
|
sane_close (device);
|
||||||
|
sane_exit();
|
||||||
|
|
||||||
if (scriptWait)
|
if (scriptWait)
|
||||||
while (wait(NULL) != -1);
|
while (wait(NULL) != -1);
|
||||||
|
|
Ładowanie…
Reference in New Issue