Package: gscan2pdf Version: 2.11.0-1 Severity: wishlist Tags: upstream patch
Hi, in current gscan2pdf the option 'Threshold before OCR' stands out, because it uses two lines while options use onlyx one line. The attached patches, which are based on upstream's 2.12.0, fix this issue in both the Scan and the OCR dialog by bringing the 'Threshold before OCR' into one line. Please consider including them into one of the future versions of gscan2pdf Thansk in advance PEter -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 5.10.0-6-amd64 (SMP w/12 CPU threads) Kernel taint flags: TAINT_CRAP Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages gscan2pdf depends on: ii imagemagick 8:6.9.11.60+dfsg-1 ii imagemagick-6.q16 [imagemagick] 8:6.9.11.60+dfsg-1 ii libconfig-general-perl 2.63-1 ii libdate-calc-perl 6.4-1.1 ii libfilesys-df-perl 0.92-6+b6 ii libgoocanvas2-perl 0.06-2 ii libgtk3-imageview-perl 6-1 ii libgtk3-perl 0.038-1 ii libgtk3-simplelist-perl 0.21-1 ii libhtml-parser-perl 3.75-1+b1 ii libimage-magick-perl 8:6.9.11.60+dfsg-1 ii libimage-sane-perl 5-1+b1 ii liblist-moreutils-perl 0.430-2 ii liblocale-codes-perl 3.66-1 ii liblocale-gettext-perl 1.07-4+b1 ii liblog-log4perl-perl 1.54-1 ii libossp-uuid-perl [libdata-uuid-perl] 1.6.2-1.5+b9 ii libpdf-builder-perl 3.021-2 ii libproc-processtable-perl 0.59-2+b1 ii libreadonly-perl 2.050-3 ii librsvg2-common 2.50.3+dfsg-1 ii libset-intspan-perl 1.19-1.1 ii libtiff-tools 4.2.0-1 ii libtry-tiny-perl 0.30-1 hi sane-utils 1.0.31-4pm1 Versions of packages gscan2pdf recommends: ii djvulibre-bin 3.5.28-1 ii gocr 0.52-3 ii pdftk-java [pdftk] 3.2.2-1 ii tesseract-ocr 4.1.1-2.1 ii unpaper 6.1-2+b2 ii xdg-utils 1.1.3-4 gscan2pdf suggests no packages. -- no debconf information
>From 3381613d2b5609c37630d0a38fa0fc6907d9e38e Mon Sep 17 00:00:00 2001 From: Peter Marschall <pe...@adpm.de> Date: Sat, 3 Nov 2018 19:07:36 +0100 Subject: [PATCH 1/2] Scan dialog: use only one line for 'Threshold before OCR' Visually adapt the display logic for 'Threshold before OCR' to the other options in the Scan dialog: use only one line for the checkbox to activate the option, the label and the input field. Signed-off-by: Peter Marschall <pe...@adpm.de> --- bin/gscan2pdf | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/gscan2pdf b/bin/gscan2pdf index a4548999..cf473bf7 100755 --- a/bin/gscan2pdf +++ b/bin/gscan2pdf @@ -4525,6 +4525,10 @@ sub add_postprocessing_ocr { } $comboboxe->set_active_index( $SETTING{'ocr engine'} ); + # Checkbox & SpinButton for threshold + my $hboxt = Gtk3::HBox->new; + $vbox->pack_start( $hboxt, FALSE, TRUE, 0 ); + my $cbto = Gtk3::CheckButton->new_with_label( __('Threshold before OCR') ); $cbto->set_tooltip_text( __( @@ -4533,13 +4537,8 @@ sub add_postprocessing_ocr { ) ); $cbto->set_active( $SETTING{'threshold-before-ocr'} ); - $vbox->pack_start( $cbto, TRUE, TRUE, 0 ); + $hboxt->pack_start( $cbto, FALSE, TRUE, 0 ); - # SpinButton for threshold - my $hboxt = Gtk3::HBox->new; - $vbox->pack_start( $hboxt, FALSE, TRUE, 0 ); - my $label = Gtk3::Label->new( __('Threshold') ); - $hboxt->pack_start( $label, FALSE, TRUE, 0 ); my $labelp = Gtk3::Label->new($PERCENT); $hboxt->pack_end( $labelp, FALSE, TRUE, 0 ); my $spinbutton = Gtk3::SpinButton->new_with_range( 0, $_100_PERCENT, 1 ); -- 2.30.2
>From 279d83898462c2efe9fb767dc89dd508d5e423ea Mon Sep 17 00:00:00 2001 From: Peter Marschall <pe...@adpm.de> Date: Sun, 7 Feb 2021 21:56:59 +0100 Subject: [PATCH 2/2] OCR dialog: use only one line for 'Threshold before OCR' For consistency, use the same logic as in the Scan dialog to display 'Threshold before OCR'. Signed-off-by: Peter Marschall <pe...@adpm.de> --- bin/gscan2pdf | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/gscan2pdf b/bin/gscan2pdf index cf473bf7..623eb9a7 100755 --- a/bin/gscan2pdf +++ b/bin/gscan2pdf @@ -6304,6 +6304,10 @@ sub ocr_dialog { ); } + # Checkbox & SpinButton for threshold + my $hboxt = Gtk3::HBox->new; + $vbox->pack_start( $hboxt, FALSE, TRUE, 0 ); + my $cbto = Gtk3::CheckButton->new_with_label( __('Threshold before OCR') ); $cbto->set_tooltip_text( __( @@ -6314,22 +6318,17 @@ sub ocr_dialog { if ( defined $SETTING{'threshold-before-ocr'} ) { $cbto->set_active( $SETTING{'threshold-before-ocr'} ); } - $vbox->pack_start( $cbto, TRUE, TRUE, 0 ); + $hboxt->pack_start( $cbto, FALSE, TRUE, 0 ); - # SpinButton for threshold - my $hboxt = Gtk3::HBox->new; - $hboxt->set_sensitive( $cbto->get_active ? TRUE : FALSE ); - $vbox->pack_start( $hboxt, FALSE, TRUE, 0 ); - $label = Gtk3::Label->new( __('Threshold') ); - $hboxt->pack_start( $label, FALSE, TRUE, 0 ); my $labelp = Gtk3::Label->new($PERCENT); $hboxt->pack_end( $labelp, FALSE, TRUE, 0 ); my $spinbutton = Gtk3::SpinButton->new_with_range( 0, $_100_PERCENT, 1 ); $spinbutton->set_value( $SETTING{'threshold tool'} ); + $spinbutton->set_sensitive( $cbto->get_active ? TRUE : FALSE ); $hboxt->pack_end( $spinbutton, FALSE, TRUE, 0 ); $cbto->signal_connect( toggled => sub { - $hboxt->set_sensitive( $cbto->get_active ? TRUE : FALSE ); + $spinbutton->set_sensitive( $cbto->get_active ? TRUE : FALSE ); } ); -- 2.30.2