From 4bc4b41457cf5caca82a936deffeb7874dddd446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Tue, 2 Dec 2014 20:19:00 +0100 Subject: Imported Upstream version 1.0.14 --- debian/patches/06_word_list_fix.dpatch | 42 ---------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 debian/patches/06_word_list_fix.dpatch (limited to 'debian/patches/06_word_list_fix.dpatch') diff --git a/debian/patches/06_word_list_fix.dpatch b/debian/patches/06_word_list_fix.dpatch deleted file mode 100644 index 90d223c..0000000 --- a/debian/patches/06_word_list_fix.dpatch +++ /dev/null @@ -1,42 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 06_word_list_fix.dpatch by -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Fix word list handling when current value is not part of the list. - -@DPATCH@ -diff -urNad sane-frontends-1.0.14~/src/gtkglue.c sane-frontends-1.0.14/src/gtkglue.c ---- sane-frontends-1.0.14~/src/gtkglue.c 2009-11-14 10:46:03.248492255 +0100 -+++ sane-frontends-1.0.14/src/gtkglue.c 2009-11-14 10:46:07.941492660 +0100 -@@ -913,6 +913,7 @@ - char **str_list; - int i, j; - int num_vector_opts = 0, *vector_opts; -+ SANE_Bool val_in_list; - - main_hbox = gtk_hbox_new (FALSE, 2); - -@@ -1073,13 +1074,23 @@ - case SANE_CONSTRAINT_WORD_LIST: - /* use a "list-selection" widget */ - num_words = opt->constraint.word_list[0]; -+ if (num_words == 0) -+ { -+ fprintf (stderr, "panel_build: empty word list!\n"); -+ break; -+ } -+ val_in_list = SANE_FALSE; - str_list = malloc ((num_words + 1) * sizeof (str_list[0])); - for (j = 0; j < num_words; ++j) - { -+ if (opt->constraint.word_list[j + 1] == val) -+ val_in_list = SANE_TRUE; - sprintf (str, "%d", opt->constraint.word_list[j + 1]); - str_list[j] = strdup (str); - } - str_list[j] = 0; -+ if (!val_in_list) -+ val = opt->constraint.word_list[1]; - sprintf (str, "%d", val); - option_menu_new (parent, title, str_list, str, elem, - dialog->tooltips, opt->desc, -- cgit v1.2.3