summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/01_lpi.patch38
-rw-r--r--debian/patches/10-set_supported_flags.patch26
-rw-r--r--debian/patches/series2
3 files changed, 66 insertions, 0 deletions
diff --git a/debian/patches/01_lpi.patch b/debian/patches/01_lpi.patch
new file mode 100644
index 0000000..68b4b2a
--- /dev/null
+++ b/debian/patches/01_lpi.patch
@@ -0,0 +1,38 @@
+Origin: Ubuntu
+Description: Add launchpad-integration support.
+---
+ configure.ac | 1 +
+ src/ui.c | 5 +++++
+ 2 files changed, 6 insertions(+)
+
+--- simple-scan.orig/configure.ac
++++ simple-scan/configure.ac
+@@ -33,6 +33,7 @@ PKG_CHECK_MODULES(SIMPLE_SCAN, [
+ cairo-pdf
+ dbus-glib-1
+ gudev-1.0
++ launchpad-integration
+ ])
+
+ AC_CHECK_HEADERS([sane/sane.h],[],[AC_MSG_ERROR([SANE not found])])
+--- simple-scan.orig/src/ui.c
++++ simple-scan/src/ui.c
+@@ -16,6 +16,7 @@
+ #include <gconf/gconf-client.h>
+ #include <math.h>
+ #include <unistd.h> // TEMP: Needed for close() in get_temporary_filename()
++#include <launchpad-integration.h>
+
+ #include "ui.h"
+ #include "book-view.h"
+@@ -1309,6 +1310,10 @@ ui_load (SimpleScan *ui)
+ }
+ gtk_builder_connect_signals (builder, ui);
+
++ /* Add Launchpad integration */
++ launchpad_integration_set_sourcepackagename ("simple-scan");
++ launchpad_integration_add_items (GTK_WIDGET (gtk_builder_get_object (builder, "help_menu")), 1, TRUE, TRUE);
++
+ ui->priv->window = GTK_WIDGET (gtk_builder_get_object (builder, "simple_scan_window"));
+ ui->priv->preview_box = GTK_WIDGET (gtk_builder_get_object (builder, "preview_vbox"));
+ ui->priv->preview_area = GTK_WIDGET (gtk_builder_get_object (builder, "preview_area"));
diff --git a/debian/patches/10-set_supported_flags.patch b/debian/patches/10-set_supported_flags.patch
new file mode 100644
index 0000000..d086e78
--- /dev/null
+++ b/debian/patches/10-set_supported_flags.patch
@@ -0,0 +1,26 @@
+Origin:
+ http://bazaar.launchpad.net/~robert-ancell/simple-scan/trunk/revision/394
+Bug: https://bugs.launchpad.net/566759
+Applied-Upstream: commit: 394
+Description: Set "duplex" and "batch-scan" flags if supported by driver.
+---
+ src/scanner.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- simple-scan.orig/src/scanner.c
++++ simple-scan/src/scanner.c
+@@ -1054,6 +1054,14 @@ do_get_option (Scanner *scanner)
+ break;
+ }
+ }
++ else if (strcmp (option->name, "duplex") == 0) {
++ if (option->type == SANE_TYPE_BOOL)
++ set_bool_option (scanner->priv->handle, option, option_index, job->type == SCAN_ADF_BOTH, NULL);
++ }
++ else if (strcmp (option->name, "batch-scan") == 0) {
++ if (option->type == SANE_TYPE_BOOL)
++ set_bool_option (scanner->priv->handle, option, option_index, job->type != SCAN_SINGLE, NULL);
++ }
+ else if (strcmp (option->name, SANE_NAME_BIT_DEPTH) == 0) {
+ if (job->depth > 0)
+ set_int_option (scanner->priv->handle, option, option_index, job->depth, NULL);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..95fa8fe
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+# Empty
+10-set_supported_flags.patch