summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien BLACHE <jblache@debian.org>2008-07-25 19:04:12 +0200
committerMattia Rizzolo <mattia@mapreri.org>2014-10-03 14:05:44 +0000
commitc12282c9b53511b258ec7f3a0faeeda5ce5767b6 (patch)
tree50374c1ddb628d049f6764b32c008cabd3db94a5
parent1dee02062c7eeea5f87733cb049bfeaa85749eb8 (diff)
Imported Debian patch 0.995-4debian/0.995-4
-rw-r--r--debian/changelog17
-rw-r--r--debian/control2
-rw-r--r--debian/patches/00list1
-rw-r--r--debian/patches/03_gimp_acquire_menu.dpatch2
-rw-r--r--debian/patches/05_options_handling_fix.dpatch242
-rw-r--r--debian/xsane.desktop1
6 files changed, 262 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index e327510..8777628 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+xsane (0.995-4) unstable; urgency=low
+
+ * debian/control:
+ + Bump Standards-Version to 3.8.0 (no changes).
+ * debian/xsane.desktop:
+ + Remove Encoding key (closes: #489790).
+
+ * debian/patches/05_options_handling_fix.dpatch:
+ + Added; duplicate strings for options with a constraint type of
+ SANE_CONSTRAINT_STRING_LIST, as the constraint is not guaranteed to
+ be stable in memory, and actually isn't when the net backend is used.
+ Based on Brad Sawatzky's patch (closes: #487475, #307088).
+ * debian/patches/03_gimp_acquire_menu.dpatch:
+ + Updated; add missing patch description.
+
+ -- Julien BLACHE <jblache@debian.org> Fri, 25 Jul 2008 19:04:12 +0200
+
xsane (0.995-3) unstable; urgency=low
* debian/patches/04_inhibit_clickthrough.dpatch:
diff --git a/debian/control b/debian/control
index 7aaf05c..48f180f 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: xsane
Section: graphics
Priority: optional
Maintainer: Julien BLACHE <jblache@debian.org>
-Standards-Version: 3.7.3
+Standards-Version: 3.8.0
Build-Depends: debhelper (>= 5), dpatch, libgimp2.0-dev (>= 2.0.0), libgtk2.0-dev, libjpeg62-dev, libpng12-dev, libtiff4-dev, liblcms1-dev, libsane-dev (>= 1.0.11-3), zlib1g-dev, gettext, autotools-dev
Package: xsane
diff --git a/debian/patches/00list b/debian/patches/00list
index 4219900..5dea2d0 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -1,5 +1,6 @@
02_docviewer
03_gimp_acquire_menu
04_inhibit_clickthrough
+05_options_handling_fix
10_broken_links
diff --git a/debian/patches/03_gimp_acquire_menu.dpatch b/debian/patches/03_gimp_acquire_menu.dpatch
index d2b4e82..0909faf 100644
--- a/debian/patches/03_gimp_acquire_menu.dpatch
+++ b/debian/patches/03_gimp_acquire_menu.dpatch
@@ -2,7 +2,7 @@
## 03_gimp_acquire_menu.dpatch.dpatch by Aurelien Jarno <aurel32@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Group XSane actions in their own submenu in the Acquire menu.
if [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
diff --git a/debian/patches/05_options_handling_fix.dpatch b/debian/patches/05_options_handling_fix.dpatch
new file mode 100644
index 0000000..31619f7
--- /dev/null
+++ b/debian/patches/05_options_handling_fix.dpatch
@@ -0,0 +1,242 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_options_handling_fix.dpatch by <jblache@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Duplicate string values for options with constraint type of
+## DP: SANE_CONSTRAINT_STRING_LIST. The string list is not guaranteed to
+## DP: be stable, and actually isn't stable when the net backend is used.
+
+@DPATCH@
+diff -urNad xsane-0.995~/src/xsane-back-gtk.c xsane-0.995/src/xsane-back-gtk.c
+--- xsane-0.995~/src/xsane-back-gtk.c 2008-07-25 18:53:38.000000000 +0200
++++ xsane-0.995/src/xsane-back-gtk.c 2008-07-25 18:53:45.764102480 +0200
+@@ -2226,11 +2226,13 @@
+ /* ----------------------------------------------------------------------------------------------------------------- */
+
+ void xsane_back_gtk_option_menu_new(GtkWidget *parent, const char *name, char *str_list[],
+- const char *val, DialogElement *elem,
++ const char *val, SANE_Constraint_Type constraint_type, DialogElement *elem,
+ GtkTooltips *tooltips, const char *desc, SANE_Int settable)
+ {
+ GtkWidget *hbox, *label, *option_menu, *menu, *item;
+ MenuItem *menu_items;
++ int dup_string;
++ char *strval;
+ int i, num_items;
+
+ DBG(DBG_proc, "xsane_back_gtk_option_menu_new(%s)\n", name);
+@@ -2248,16 +2250,23 @@
+
+ menu_items = malloc((num_items + 1) * sizeof(menu_items[0]));
+
++ dup_string = (constraint_type == SANE_CONSTRAINT_STRING_LIST);
++
+ menu = gtk_menu_new();
+ for (i = 0; i < num_items; ++i)
+ {
+- item = gtk_menu_item_new_with_label(_BGT(str_list[i]));
++ if (dup_string)
++ strval = strdup(str_list[i]);
++ else
++ strval = str_list[i];
++
++ item = gtk_menu_item_new_with_label(_BGT(strval));
+ gtk_container_add(GTK_CONTAINER(menu), item);
+ g_signal_connect(GTK_OBJECT(item), "activate", (GtkSignalFunc) xsane_back_gtk_option_menu_callback, menu_items + i);
+
+ gtk_widget_show(item);
+
+- menu_items[i].label = str_list[i];
++ menu_items[i].label = strval;
+ menu_items[i].elem = elem;
+ menu_items[i].index = i;
+ }
+@@ -2403,14 +2412,15 @@
+ xsane.standard_hbox = NULL;
+ xsane.advanced_hbox = NULL;
+
+- /* free the menu labels of integer/fix-point word-lists: */
++ /* free the menu labels */
+ for (i = 0; i < xsane.num_elements; ++i)
+ {
+ if (xsane.element[i].menu)
+ {
+ opt = xsane_get_option_descriptor(xsane.dev, i);
+ elem = xsane.element + i;
+- if (opt->type != SANE_TYPE_STRING)
++ if ((opt->type != SANE_TYPE_STRING)
++ || (opt->constraint_type == SANE_CONSTRAINT_STRING_LIST))
+ {
+ for (j = 0; j < elem->menu_size; ++j)
+ {
+diff -urNad xsane-0.995~/src/xsane-back-gtk.h xsane-0.995/src/xsane-back-gtk.h
+--- xsane-0.995~/src/xsane-back-gtk.h 2008-07-25 18:53:38.000000000 +0200
++++ xsane-0.995/src/xsane-back-gtk.h 2008-07-25 18:53:45.764102480 +0200
+@@ -117,7 +117,7 @@
+ gfloat quant, int automatic,
+ DialogElement *elem, GtkTooltips *tooltips, const char *desc, SANE_Int settable);
+ extern void xsane_back_gtk_option_menu_new(GtkWidget *parent, const char *name, char *str_list[],
+- const char *val, DialogElement *elem, GtkTooltips *tooltips, const char *desc, SANE_Int settable);
++ const char *val, SANE_Constraint_Type constraint_type, DialogElement *elem, GtkTooltips *tooltips, const char *desc, SANE_Int settable);
+ extern void xsane_back_gtk_text_entry_new(GtkWidget *parent, const char *name, const char *val,
+ DialogElement *elem, GtkTooltips *tooltips, const char *desc, SANE_Int settable);
+ extern void xsane_back_gtk_push_button_callback(GtkWidget *widget, gpointer data);
+diff -urNad xsane-0.995~/src/xsane-front-gtk.c xsane-0.995/src/xsane-front-gtk.c
+--- xsane-0.995~/src/xsane-front-gtk.c 2008-07-25 18:53:38.000000000 +0200
++++ xsane-0.995/src/xsane-front-gtk.c 2008-07-25 18:53:58.887267644 +0200
+@@ -64,10 +64,10 @@
+ int *state, void *xsane_toggle_button_callback);
+ GtkWidget *xsane_button_new_with_pixmap(GdkWindow *window, GtkWidget *parent, const char *xpm_d[], const char *desc,
+ void *xsane_button_callback, gpointer data);
+-void xsane_option_menu_new(GtkWidget *parent, char *str_list[], const char *val, int option_number, const char *desc,
++void xsane_option_menu_new(GtkWidget *parent, char *str_list[], const char *val, SANE_Constraint_Type constraint_type, int option_number, const char *desc,
+ void *option_menu_callback, SANE_Int settable, const gchar *widget_name);
+ void xsane_option_menu_new_with_pixmap(GdkWindow *window, GtkBox *parent, const char *xpm_d[], const char *desc,
+- char *str_list[], const char *val,
++ char *str_list[], const char *val, SANE_Constraint_Type constraint_type,
+ GtkWidget **data, int option,
+ void *option_menu_callback, SANE_Int settable, const gchar *widget_name);
+ void xsane_range_new(GtkBox *parent, char *labeltext, const char *desc,
+@@ -1007,12 +1007,14 @@
+
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+
+-void xsane_option_menu_new(GtkWidget *parent, char *str_list[], const char *val, int option_number, const char *desc,
++void xsane_option_menu_new(GtkWidget *parent, char *str_list[], const char *val, SANE_Constraint_Type constraint_type, int option_number, const char *desc,
+ void *option_menu_callback, SANE_Int settable, const gchar *widget_name)
+ {
+ GtkWidget *option_menu, *menu, *item;
+ MenuItem *menu_items;
+ DialogElement *elem;
++ int dup_string;
++ char *strval;
+ int i, num_items;
+
+ DBG(DBG_proc, "xsane_option_menu_new\n");
+@@ -1031,9 +1033,16 @@
+ gtk_widget_set_name(menu, widget_name);
+ }
+
++ dup_string = (constraint_type == SANE_CONSTRAINT_STRING_LIST);
++
+ for (i = 0; i < num_items; ++i)
+ {
+- item = gtk_menu_item_new_with_label(_BGT(str_list[i]));
++ if (dup_string)
++ strval = strdup(str_list[i]);
++ else
++ strval = str_list[i];
++
++ item = gtk_menu_item_new_with_label(_BGT(strval));
+ gtk_container_add(GTK_CONTAINER(menu), item);
+
+ if (option_menu_callback)
+@@ -1047,7 +1056,7 @@
+
+ gtk_widget_show(item);
+
+- menu_items[i].label = str_list[i];
++ menu_items[i].label = strval;
+ menu_items[i].elem = elem;
+ menu_items[i].index = i;
+ }
+@@ -1075,7 +1084,7 @@
+ /* ---------------------------------------------------------------------------------------------------------------------- */
+
+ void xsane_option_menu_new_with_pixmap(GdkWindow *window, GtkBox *parent, const char *xpm_d[], const char *desc,
+- char *str_list[], const char *val,
++ char *str_list[], const char *val, SANE_Constraint_Type constraint_type,
+ GtkWidget **data, int option,
+ void *option_menu_callback, SANE_Int settable, const gchar *widget_name)
+ {
+@@ -1094,7 +1103,7 @@
+ gtk_box_pack_start(GTK_BOX(hbox), pixmapwidget, FALSE, FALSE, 2);
+ gtk_widget_show(pixmapwidget);
+
+- xsane_option_menu_new(hbox, str_list, val, option, desc, option_menu_callback, settable, widget_name);
++ xsane_option_menu_new(hbox, str_list, val, constraint_type, option, desc, option_menu_callback, settable, widget_name);
+ gtk_widget_show(hbox);
+ }
+
+diff -urNad xsane-0.995~/src/xsane-front-gtk.h xsane-0.995/src/xsane-front-gtk.h
+--- xsane-0.995~/src/xsane-front-gtk.h 2008-07-25 18:53:38.000000000 +0200
++++ xsane-0.995/src/xsane-front-gtk.h 2008-07-25 18:53:45.768101033 +0200
+@@ -54,10 +54,10 @@
+ extern GtkWidget *xsane_button_new_with_pixmap(GdkWindow *window, GtkWidget *parent, const char *xpm_d[], const char *desc,
+ void *xsane_button_callback, gpointer data);
+ extern void xsane_pixmap_new(GtkWidget *parent, char *title, int width, int height, XsanePixmap *hist);
+-extern void xsane_option_menu_new(GtkWidget *parent, char *str_list[], const char *val, int option_number, const char *desc,
++extern void xsane_option_menu_new(GtkWidget *parent, char *str_list[], const char *val, SANE_Constraint_Type constraint_type, int option_number, const char *desc,
+ void *option_menu_callback, SANE_Int settable, const gchar *widget_name);
+ extern void xsane_option_menu_new_with_pixmap(GdkWindow *window, GtkBox *parent, const char *xpm_d[], const char *desc,
+- char *str_list[], const char *val,
++ char *str_list[], const char *val, SANE_Constraint_Type constraint_type,
+ GtkWidget **data, int option,
+ void *option_menu_callback, SANE_Int settable, const gchar *widget_name);
+ extern void xsane_range_new(GtkBox *parent, char *labeltext, const char *desc,
+diff -urNad xsane-0.995~/src/xsane.c xsane-0.995/src/xsane.c
+--- xsane-0.995~/src/xsane.c 2008-07-25 18:53:45.132101694 +0200
++++ xsane-0.995/src/xsane.c 2008-07-25 18:53:45.772100494 +0200
+@@ -876,7 +876,7 @@
+ str_list[j] = 0;
+ sprintf(str, "%d", (int) val);
+
+- xsane_option_menu_new_with_pixmap(xsane.xsane_window->window, GTK_BOX(parent), image_xpm, desc, str_list, str, &resolution_widget, well_known_option,
++ xsane_option_menu_new_with_pixmap(xsane.xsane_window->window, GTK_BOX(parent), image_xpm, desc, str_list, str, opt->constraint_type, &resolution_widget, well_known_option,
+ xsane_resolution_list_callback, SANE_OPTION_IS_SETTABLE(opt->cap), widget_name);
+
+ free(str_list);
+@@ -931,7 +931,7 @@
+
+
+ xsane_option_menu_new_with_pixmap(xsane.xsane_window->window, GTK_BOX(parent), image_xpm, desc,
+- str_list, str, &resolution_widget, well_known_option,
++ str_list, str, opt->constraint_type, &resolution_widget, well_known_option,
+ xsane_resolution_list_callback, SANE_OPTION_IS_SETTABLE(opt->cap), widget_name);
+ free(str_list);
+ }
+@@ -1490,7 +1490,7 @@
+ set = malloc(opt->size);
+ status = xsane_control_option(xsane.dev, xsane.well_known.scansource, SANE_ACTION_GET_VALUE, set, 0);
+
+- xsane_option_menu_new(hbox, (char **) opt->constraint.string_list, set, xsane.well_known.scansource,
++ xsane_option_menu_new(hbox, (char **) opt->constraint.string_list, set, opt->constraint_type, xsane.well_known.scansource,
+ _BGT(opt->desc), 0, SANE_OPTION_IS_SETTABLE(opt->cap), 0);
+ }
+ break;
+@@ -1529,7 +1529,7 @@
+ set = malloc(opt->size);
+ status = xsane_control_option(xsane.dev, xsane.well_known.scanmode, SANE_ACTION_GET_VALUE, set, 0);
+
+- xsane_option_menu_new(hbox, (char **) opt->constraint.string_list, set, xsane.well_known.scanmode,
++ xsane_option_menu_new(hbox, (char **) opt->constraint.string_list, set, opt->constraint_type, xsane.well_known.scanmode,
+ _BGT(opt->desc), xsane_scanmode_menu_callback, SANE_OPTION_IS_SETTABLE(opt->cap), 0);
+ }
+ break;
+@@ -4635,7 +4635,7 @@
+ }
+ str_list[j] = 0;
+ sprintf(str, "%d", val);
+- xsane_back_gtk_option_menu_new(parent, title, str_list, str, elem, xsane.tooltips, _BGT(opt->desc),
++ xsane_back_gtk_option_menu_new(parent, title, str_list, str, opt->constraint_type, elem, xsane.tooltips, _BGT(opt->desc),
+ SANE_OPTION_IS_SETTABLE(opt->cap));
+ free(str_list);
+ gtk_widget_show(parent->parent);
+@@ -4733,7 +4733,7 @@
+ }
+ str_list[j] = 0;
+ sprintf(str, "%g", SANE_UNFIX(val));
+- xsane_back_gtk_option_menu_new(parent, title, str_list, str, elem, xsane.tooltips, _BGT(opt->desc), SANE_OPTION_IS_SETTABLE(opt->cap));
++ xsane_back_gtk_option_menu_new(parent, title, str_list, str, opt->constraint_type, elem, xsane.tooltips, _BGT(opt->desc), SANE_OPTION_IS_SETTABLE(opt->cap));
+ free (str_list);
+ gtk_widget_show(parent->parent);
+ }
+@@ -4770,7 +4770,7 @@
+ (strcmp (opt->name, SANE_NAME_SCAN_SOURCE) != 0) ) /* do not show scansource */
+ {
+ /* use a "list-selection" widget */
+- xsane_back_gtk_option_menu_new(parent, title, (char **) opt->constraint.string_list, buf,
++ xsane_back_gtk_option_menu_new(parent, title, (char **) opt->constraint.string_list, buf, opt->constraint_type,
+ elem, xsane.tooltips, _BGT(opt->desc), SANE_OPTION_IS_SETTABLE(opt->cap));
+ gtk_widget_show (parent->parent);
+ }
diff --git a/debian/xsane.desktop b/debian/xsane.desktop
index c320bc5..76bf10e 100644
--- a/debian/xsane.desktop
+++ b/debian/xsane.desktop
@@ -1,5 +1,4 @@
[Desktop Entry]
-Encoding=UTF-8
Name=XSane Image scanning program
Name[ru]=Программа для сканирования изображений
Name[ca]=Programa d'escaneig d'imatges XSane