gnome-scan r737 - in trunk: . modules/gsane
- From: bersace svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-scan r737 - in trunk: . modules/gsane
- Date: Tue, 23 Dec 2008 21:49:30 +0000 (UTC)
Author: bersace
Date: Tue Dec 23 21:49:30 2008
New Revision: 737
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=737&view=rev
Log:
Added method to enable mass acquisition.
Modified:
trunk/ChangeLog
trunk/modules/gsane/gsane-scanner.c
trunk/modules/gsane/gsane-scanner.h
Modified: trunk/modules/gsane/gsane-scanner.c
==============================================================================
--- trunk/modules/gsane/gsane-scanner.c (original)
+++ trunk/modules/gsane/gsane-scanner.c Tue Dec 23 21:49:30 2008
@@ -35,6 +35,7 @@
/* properties */
gchar* sane_id;
gchar* sane_type;
+ gboolean mass_acquisition;
/* fields */
GHashTable* option_handlers;
@@ -43,8 +44,6 @@
/* SANE handle */
SANE_Handle handle;
- /* whether the adf is selected and thus we should scan until "NO_DOCS" */
- gboolean is_adf_selected;
/* the number of pages scanned from the source (should not be > 1 for non ADF source) */
guint image_count;
/* SANE frame paramters */
@@ -86,6 +85,12 @@
}
+void
+gsane_scanner_set_mass_acquisition(GSaneScanner* self, gboolean mass_acquisition)
+{
+ self->priv->mass_acquisition = mass_acquisition;
+}
+
/* Returns whether the status is good. Update node status if
failing. */
static gboolean
@@ -276,7 +281,7 @@
GeglBuffer *buffer;
/* No mass acquisition from flatbed. We might use timeout scan, at this level? */
- if (self->priv->image_count > 0 && !self->priv->is_adf_selected)
+ if (self->priv->image_count > 0 && !self->priv->mass_acquisition)
return FALSE;
/* start the frame */
@@ -393,7 +398,7 @@
self->priv->handle = NULL;
self->priv->opt_thread = NULL;
self->priv->params_thread = NULL;
- self->priv->is_adf_selected = FALSE;
+ self->priv->mass_acquisition = FALSE;
gsane_processor_init(&self->priv->processor);
}
Modified: trunk/modules/gsane/gsane-scanner.h
==============================================================================
--- trunk/modules/gsane/gsane-scanner.h (original)
+++ trunk/modules/gsane/gsane-scanner.h Tue Dec 23 21:49:30 2008
@@ -59,6 +59,7 @@
void gsane_scanner_register (GTypeModule *module);
GnomeScanScanner* gsane_scanner_new (const SANE_Device *device);
void gsane_scanner_reload_parameters(GSaneScanner* self);
+void gsane_scanner_set_mass_acquisition(GSaneScanner* self, gboolean mass_acquisition);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]