fix clear calibration and need calibration options

merge-requests/1/head
Stphane Voltz 2009-11-29 21:14:39 +01:00
rodzic 5d1ebac8e3
commit 36ea76f5a8
2 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -1658,6 +1658,9 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
case OPT_SOURCE:
strcpy (val, s->val[option].s);
break;
case OPT_NEED_CALIBRATION_SW:
*(SANE_Bool *) val = !s->calibrated;
break;
default:
DBG (2, "sane_control_option: can't get unknown option %d\n",
option);
@ -1798,10 +1801,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
case OPT_CLEAR_CALIBRATION:
gt68xx_clear_calibration (s);
break;
case OPT_NEED_CALIBRATION_SW:
*(SANE_Bool *) val = !s->calibrated;
myinfo |= SANE_INFO_RELOAD_OPTIONS;
break;
default:

Wyświetl plik

@ -2529,6 +2529,7 @@ gt68xx_clear_calibration (GT68xx_Scanner * scanner)
/* reset flags */
scanner->calibrated = SANE_FALSE;
scanner->val[OPT_QUALITY_CAL].w = SANE_FALSE;
scanner->val[OPT_NEED_CALIBRATION_SW].w = SANE_TRUE;
DBG (5, "gt68xx_clear_calibration: done\n");
return SANE_STATUS_GOOD;
}
@ -2734,6 +2735,7 @@ gt68xx_read_calibration (GT68xx_Scanner * scanner)
fclose (fcal);
scanner->val[OPT_QUALITY_CAL].w = SANE_TRUE;
scanner->val[OPT_NEED_CALIBRATION_SW].w = SANE_FALSE;
scanner->calibrated = SANE_TRUE;
return SANE_STATUS_GOOD;
}