Package: clamtk
Version: 4.11-2
Severity: wishlist
Tags: patch

The recursive checkbox isn't save in preferences. To add it would be very 
useful.
I attach a "patch" which works for me but it's my first, therefore... ;-)

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (980, 'testing'), (965, 'testing-proposed-updates'), (960, 
'testing'), (940, 'stable'), (920, 'stable'), (80, 'unstable'), (60, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages clamtk depends on:
ii  bind9-host             1:9.5.1.dfsg.P2-1 Version of 'host' bundled with BIN
ii  clamav                 0.94.dfsg.2-1     anti-virus utility for Unix - comm
ii  clamav-freshclam [clam 0.94.dfsg.2-1     anti-virus utility for Unix - viru
ii  libconfig-tiny-perl    2.12-1            Read/Write .ini style files with a
ii  libdate-calc-perl      5.4-6             Perl library for accessing dates
ii  libfile-find-rule-perl 0.30-3            Alternative interface to File::Fin
ii  libgtk2-perl           1:1.220-2         Perl interface to the 2.x series o
ii  liblocale-gettext-perl 1.05-4            Using libc functions for internati
ii  libwww-perl            5.825-1           WWW client/server library for Perl
ii  perl                   5.10.0-19         Larry Wall's Practical Extraction 
ii  zenity                 2.24.1-1          Display graphical dialog boxes fro

clamtk recommends no packages.

Versions of packages clamtk suggests:
ii  cabextract                    1.2-3      a program to extract Microsoft Cab

-- no debconf information
diff -u ClamTk.orig_debian/GUI.pm ClamTk.mod_ghent/GUI.pm
--- ClamTk.orig_debian/GUI.pm	2009-04-18 19:34:53.000000000 +0200
+++ ClamTk.mod_ghent/GUI.pm	2009-04-19 12:49:23.000000000 +0200
@@ -106,8 +106,7 @@
             'gtk-zoom-fit',
             gettext("_Recursive Scan"),
             "<control>R",
-            gettext("Recursively scan a directory"),
-            sub { getfile('recur') }
+            gettext("Recursively scan a directory"), sub { getfile('recur') }
         ],
         [   "Exit",           'gtk-quit',
             gettext("E_xit"), "<control>X",
@@ -680,9 +679,9 @@
 
     my $title
         = ( $option eq 'file' ) ? gettext('Select File')
-        : ( $option eq 'dir' )
+        : ( $option eq 'dir' and !$recursive )
         ? gettext('Select a Directory (directory scan)')
-        : ( $option eq 'recur' )
+        : ( $option eq 'recur' or $recursive )
         ? gettext('Select a Directory (recursive scan)')
         : '';
 
@@ -1042,8 +1041,9 @@
     my $sh     = $Config->{_}->{ScanHidden} || 0;
     my $limit  = $Config->{_}->{SizeLimit}  || 0;
     my $t      = $Config->{_}->{Thorough}   || 0;
+    my $recu   = $Config->{_}->{Recursive}  || 0;
     my $ls     = "$day $mon $year";
-    ClamTk::Prefs->set_all( $main::scanner, $sl, $sh, $limit, $t, $ls, $li,
+    ClamTk::Prefs->set_all( $main::scanner, $sl, $sh, $limit, $t, $recu, $ls, $li,
         $update );
 
     $last_date_text->set_text("$day $mon $year");
@@ -1462,6 +1462,9 @@
     if ( $Config->{_}->{Thorough} ) {
         $deep_box->set_active(TRUE);
     }
+    if ( $Config->{_}->{Recursive} ) {
+        $recur_box->set_active(TRUE);
+    }
     $scan_status_label->set_text(
         gettext("\nLoaded your scanning preferences.") );
 }
@@ -1492,7 +1495,7 @@
     }
 
     my $ret_val = ClamTk::Prefs->set_all( $main::scanner, $save_log, $hidden,
-        $size_set, $thorough, $ls, $li, $update );
+        $size_set, $thorough, $recursive, $ls, $li, $update );
 
     my $msg
         = ( $ret_val == 0 )
diff -u ClamTk.orig_debian/Prefs.pm ClamTk.mod_ghent/Prefs.pm
--- ClamTk.orig_debian/Prefs.pm	2008-12-26 14:13:50.000000000 +0100
+++ ClamTk.mod_ghent/Prefs.pm	2009-04-19 12:19:42.000000000 +0200
@@ -58,12 +58,13 @@
     my $sh     = $pkg->{_}->{ScanHidden}    ||= 0;
     my $limit  = $pkg->{_}->{SizeLimit}     ||= 0;
     my $t      = $pkg->{_}->{Thorough}      ||= 0;
+    my $recu   = $pkg->{_}->{Recursive}     ||= 0;
     my $ls     = $pkg->{_}->{LastScan}      ||= gettext('Never');
     my $li     = $pkg->{_}->{LastInfection} ||= gettext('Never');
-    my $update = $pkg->{_}->{Update}        ||= 'undef';
+    my $update = $pkg->{_}->{Update}        ||= 'undef';    
 
     my $count
-        = ClamTk::Prefs->set_all( $main::scanner, $sl, $sh, $limit, $t, $ls,
+        = ClamTk::Prefs->set_all( $main::scanner, $sl, $sh, $limit, $t, $recu, $ls,
         $li, $update );
     return $count;
 }
@@ -76,6 +77,7 @@
     $pkg->{_}->{ScanHidden}    = 0;
     $pkg->{_}->{SizeLimit}     = 0;
     $pkg->{_}->{Thorough}      = 0;
+    $pkg->{_}->{Recursive}     = 0;
     $pkg->{_}->{LastScan}      = gettext('Never');
     $pkg->{_}->{LastInfection} = gettext('Never');
     $pkg->{_}->{Update}        = 'undef';               # shared or single
@@ -95,7 +97,7 @@
 sub set_all {
     my ($class) = shift;
     my ($self)  = shift;
-    my ( $save_log, $hidden, $size_set, $thorough, $last_scan, $last_infected,
+    my ( $save_log, $hidden, $size_set, $thorough, $recursive, $last_scan, $last_infected,
         $update )
         = @_;
     $pkg                       = Config::Tiny->new();
@@ -103,6 +105,7 @@
     $pkg->{_}->{ScanHidden}    = $hidden;
     $pkg->{_}->{SizeLimit}     = $size_set;
     $pkg->{_}->{Thorough}      = $thorough;
+    $pkg->{_}->{Recursive}     = $recursive;
     $pkg->{_}->{LastScan}      = $last_scan;
     $pkg->{_}->{LastInfection} = $last_infected;
     $pkg->{_}->{Update}        = $update;
diff -u ClamTk.orig_debian/Update.pm ClamTk.mod_ghent/Update.pm
--- ClamTk.orig_debian/Update.pm	2009-02-14 00:58:21.000000000 +0100
+++ ClamTk.mod_ghent/Update.pm	2009-04-19 11:52:58.000000000 +0200
@@ -313,8 +313,9 @@
     my ($ret) = ClamTk::Prefs->set_all(
         $main::scanner,                $Config->{_}->{SaveToLog},
         $Config->{_}->{ScanHidden},    $Config->{_}->{SizeLimit},
-        $Config->{_}->{Thorough},      $Config->{_}->{LastScan},
-        $Config->{_}->{LastInfection}, $update
+        $Config->{_}->{Thorough},      $Config->{_}->{Recursive},
+        $Config->{_}->{LastScan},      $Config->{_}->{LastInfection},
+        $update
     );
 
     if ( $ret == 1 ) {

Reply via email to