gnome-scan r508 - in trunk: . modules
- From: bersace svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-scan r508 - in trunk: . modules
- Date: Tue, 26 Feb 2008 12:58:59 +0000 (GMT)
Author: bersace
Date: Tue Feb 26 12:58:58 2008
New Revision: 508
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=508&view=rev
Log:
Handle gfloat.
Modified:
trunk/ChangeLog
trunk/modules/gsane-scanner.c
Modified: trunk/modules/gsane-scanner.c
==============================================================================
--- trunk/modules/gsane-scanner.c (original)
+++ trunk/modules/gsane-scanner.c Tue Feb 26 12:58:58 2008
@@ -284,9 +284,9 @@
GList* list = NULL;
priv->load = gegl_node_new_child (root,
- "operation", "load-buffer",
- "buffer", priv->buffer,
- NULL);
+ "operation", "load-buffer",
+ "buffer", priv->buffer,
+ NULL);
list = g_list_append (list, priv->load);
return list;
}
@@ -347,9 +347,9 @@
priv->buffer, fmt);
gegl_node_set (priv->load,
- "buffer", priv->buffer,
- NULL);
-
+ "buffer", priv->buffer,
+ NULL);
+
priv->first = FALSE;
return TRUE;
}
@@ -1048,6 +1048,9 @@
case G_TYPE_DOUBLE:
g_value_set_double(value, SANE_UNFIX (*((SANE_Word*) v)));
break;
+ case G_TYPE_FLOAT:
+ g_value_set_float(value, SANE_UNFIX (*((SANE_Word*) v)));
+ break;
case G_TYPE_STRING:
g_value_set_string (value, g_strdup(v));
break;
@@ -1078,9 +1081,9 @@
SANE_Word word;
SANE_Status status;
void *v = NULL;
-
+
/* don't reset option to the same value */
- old = gsane_scanner_option_get_value (gss, spec);
+ old = gsane_scanner_option_get_value (gss, spec);
if (gs_param_values_cmp (spec, old, value) == 0)
return 0;
@@ -1097,6 +1100,10 @@
word = SANE_FIX (g_value_get_double (value));
v = &word;
break;
+ case G_TYPE_FLOAT:
+ word = SANE_FIX (g_value_get_float (value));
+ v = &word;
+ break;
case G_TYPE_STRING:
v = g_value_dup_string (value);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]