image-device: Remove cancelling boolean from private data

The boolean is just used to emit a warning for unexpected state
transitions. It is sufficient to pass it to the deactivate function
directly for that purpose.
This commit is contained in:
Benjamin Berg
2020-11-04 14:13:00 +01:00
parent 96fa0a96eb
commit f56aacc7ef
3 changed files with 13 additions and 31 deletions
+1 -6
View File
@@ -82,7 +82,6 @@ static void
fp_image_device_cancel_action (FpDevice *device)
{
FpImageDevice *self = FP_IMAGE_DEVICE (device);
FpImageDevicePrivate *priv = fp_image_device_get_instance_private (self);
FpiDeviceAction action;
action = fpi_device_get_current_action (device);
@@ -93,11 +92,7 @@ fp_image_device_cancel_action (FpDevice *device)
action == FPI_DEVICE_ACTION_VERIFY ||
action == FPI_DEVICE_ACTION_IDENTIFY ||
action == FPI_DEVICE_ACTION_CAPTURE)
{
priv->cancelling = TRUE;
fpi_image_device_deactivate (self);
priv->cancelling = FALSE;
}
fpi_image_device_deactivate (self, TRUE);
}
static void