gnome-scan r684 - in trunk: . modules/gsane
- From: bersace svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-scan r684 - in trunk: . modules/gsane
- Date: Sun, 14 Dec 2008 16:35:37 +0000 (UTC)
Author: bersace
Date: Sun Dec 14 16:35:37 2008
New Revision: 684
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=684&view=rev
Log:
Ignore int array options.
Modified:
trunk/ChangeLog
trunk/modules/gsane/gsane-option-handler-generic.c
Modified: trunk/modules/gsane/gsane-option-handler-generic.c
==============================================================================
--- trunk/modules/gsane/gsane-option-handler-generic.c (original)
+++ trunk/modules/gsane/gsane-option-handler-generic.c Sun Dec 14 16:35:37 2008
@@ -56,6 +56,7 @@
{
GSaneOptionHandlerGeneric* self = GSANE_OPTION_HANDLER_GENERIC(handler);
gboolean boolval;
+ gint array_length;
gint intval;
gint intmin, intstep, intmax;
@@ -68,6 +69,11 @@
g_debug("\toption %d : boolean %s = %s", n, desc->name, GSANE_BOOLEAN_TO_STRING(boolval));
break;
case SANE_TYPE_INT:
+ array_length = desc->size / sizeof(SANE_Word);
+ if (array_length > 1) {
+ g_debug("Ignoring int array option %s", desc->name);
+ break;
+ }
intval = gsane_option_handler_get_int(handler, desc, n, NULL);
if (desc->constraint_type == SANE_CONSTRAINT_RANGE) {
intmin = desc->constraint.range->min;
@@ -79,7 +85,9 @@
intstep = 1;
intmax = G_MAXINT;
}
- self->priv->option = GNOME_SCAN_OPTION(gnome_scan_option_int_new(desc->name, S_(desc->title), S_(desc->desc), group, SANE_GETTEXT_PACKAGE, intval, intmin, intstep, intmax, GNOME_SCAN_UNIT_NONE, GNOME_SCAN_OPTION_HINT_SECONDARY));
+ self->priv->option = GNOME_SCAN_OPTION(gnome_scan_option_int_new(desc->name, S_(desc->title), S_(desc->desc), group, SANE_GETTEXT_PACKAGE,
+ intval, intmin, intstep, intmax,
+ gsane_option_unit(desc), GNOME_SCAN_OPTION_HINT_SECONDARY));
g_signal_connect_swapped(self->priv->option, "notify::value", G_CALLBACK(gsane_option_handler_generic_int_option_value_changed), self);
g_debug("\toption %d : int %s = %d", n, desc->name, intval);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]