From 9976c0cfc6516af25dd26ccba03e389781431825 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sun, 7 Feb 2021 21:53:39 +0200 Subject: Added a new, separate options section for Archives. Options from the Archive Limits section have been moved there. A new option for disabling/enabling archive scanning has been added (--scan-archives switch for clamscan). This is related to issue #15. Signed-off-by: Mavridis Philippe --- src/CMakeLists.txt | 2 +- src/archivelimits.ui | 135 ------------------------------------------- src/archives.ui | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/configdialog.cpp | 8 +-- src/configdialog.h | 2 +- src/klamavconfig.kcfg | 6 +- src/scanviewer.cpp | 3 + 7 files changed, 170 insertions(+), 142 deletions(-) delete mode 100644 src/archivelimits.ui create mode 100644 src/archives.ui (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 61810e0..2275778 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,7 +39,7 @@ tde_add_executable( ${PROJECT_NAME} AUTOMOC ktview.cpp ktlistcron.cpp kticon.cpp activityviewer.cpp collectiondb.cpp configdialog.cpp klamavconfig.kcfgc - archivelimits.ui specialfiletypes.ui + archives.ui specialfiletypes.ui firstrunwizard.ui logoptions.ui backend.ui k3bjobprogressosd_mod.cpp diff --git a/src/archivelimits.ui b/src/archivelimits.ui deleted file mode 100644 index 5aac2d8..0000000 --- a/src/archivelimits.ui +++ /dev/null @@ -1,135 +0,0 @@ - -ArchiveLimits - - - ArchiveLimits - - - - 0 - 0 - 827 - 299 - - - - Archive Limits - - - - unnamed - - - - LimitsGroup - - - - 7 - 7 - 1 - 1 - - - - GroupBoxPanel - - - Archive Limits - - - - unnamed - - - - layout11 - - - - unnamed - - - - MaxLevRecur - - - Maximum Level of Recursion - - - - - MaxCompRatio - - - Maximum MBs of Files to Scan - - - - - kcfg_RecursionLevel - - - Default - - - 9999 - - - - - MaxFilesExt - - - Maximum Number of Files to Extract - - - - - kcfg_MaxScanSize - - - Default - - - 9999 - - - - - kcfg_NoFilesToExtract - - - Default - - - 9999 - - - - - MaxMBsEx - - - Maximum MBs to Extract - - - - - kcfg_MaxFileSize - - - Default - - - 9999 - - - - - - - - - - diff --git a/src/archives.ui b/src/archives.ui new file mode 100644 index 0000000..af27882 --- /dev/null +++ b/src/archives.ui @@ -0,0 +1,156 @@ + +ArchiveOptions + + + ArchiveOptionss + + + + 0 + 0 + 436 + 282 + + + + Archive Options + + + + unnamed + + + + groupBox4 + + + Archive Scanning + + + + unnamed + + + + kcfg_scanArchives + + + Scan archives + + + + + + + LimitsGroup + + + + 7 + 7 + 1 + 1 + + + + NoFrame + + + Archive Limits + + + + unnamed + + + + layout11 + + + + unnamed + + + + MaxLevRecur + + + Maximum Level of Recursion + + + + + MaxCompRatio + + + Maximum MBs of Files to Scan + + + + + kcfg_RecursionLevel + + + Default + + + 9999 + + + + + MaxFilesExt + + + Maximum Number of Files to Extract + + + + + kcfg_MaxScanSize + + + Default + + + 9999 + + + + + kcfg_NoFilesToExtract + + + Default + + + 9999 + + + + + MaxMBsEx + + + Maximum MBs to Extract + + + + + kcfg_MaxFileSize + + + Default + + + 9999 + + + + + + + + + + diff --git a/src/configdialog.cpp b/src/configdialog.cpp index b363550..5cd76ac 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -15,7 +15,7 @@ email : markey@web.de #include "configdialog.h" #include "backend.h" -#include "archivelimits.h" +#include "archives.h" #include "specialfiletypes.h" /* #include "autoscanoptions.h" */ #include "logoptions.h" @@ -54,7 +54,7 @@ KlamavConfigDialog::KlamavConfigDialog( TQWidget *parent, const char* name, TDEC // IMPORTANT Don't simply change the page names, they are used as identifiers in other parts of the app. m_klambackend = new KlamBackend( 0, "Scanning Backend" ); - m_archivelimits = new ArchiveLimits( 0, "Archive Limits" ); + m_archives = new ArchiveOptions( 0, "Archives" ); m_emailprotection = new Sigtool ( 0, "E-mail protection" ); m_specialfiletypes = new SpecialFileTypes( 0, "File Types" ); /* m_autoscanoptions = new AutoScanOptions( 0, "Auto-Scan" ); */ @@ -65,7 +65,7 @@ KlamavConfigDialog::KlamavConfigDialog( TQWidget *parent, const char* name, TDEC connect( m_klambackend->kcfg_ScannerClamdscan, SIGNAL(toggled(bool)), this, SLOT(slotToggleClamdscan(bool)) ); slotToggleClamdscan( m_klambackend->kcfg_ScannerClamdscan->isOn() ); // initial state - addPage( m_archivelimits, i18n( "Archive Limits" ), "ark", i18n( "Configure Archive Limits" ) ); + addPage( m_archives, i18n( "Archives" ), "ark", i18n( "Configure Archive Scanning" ) ); addPage( m_emailprotection, i18n( "E-mail protection" ), "email", i18n( "Set up your e-mail client to use Klammail" ) ); addPage( m_specialfiletypes, i18n( "File Types" ), "folder", i18n( "Configure File Types" ) ); /* addPage( m_autoscanoptions, i18n( "Auto-Scan" ), "filefind", i18n( "Configure Auto-Scan" ) ); */ @@ -92,7 +92,7 @@ KlamavConfigDialog::~KlamavConfigDialog() void KlamavConfigDialog::slotToggleClamdscan(bool on) { m_klambackend->kcfg_ClamdMultiscan->setEnabled(on); - m_archivelimits->setEnabled(!on); + m_archives->setEnabled(!on); m_specialfiletypes->setEnabled(!on); } diff --git a/src/configdialog.h b/src/configdialog.h index 951c571..ad906c9 100644 --- a/src/configdialog.h +++ b/src/configdialog.h @@ -47,7 +47,7 @@ class KlamavConfigDialog : public TDEConfigDialog bool clamdscan; class KlamBackend *m_klambackend; - class ArchiveLimits *m_archivelimits; + class ArchiveOptions *m_archives; class SpecialFileTypes *m_specialfiletypes; class Sigtool *m_emailprotection; class AutoScanOptions *m_autoscanoptions; diff --git a/src/klamavconfig.kcfg b/src/klamavconfig.kcfg index 6b05806..25d2029 100644 --- a/src/klamavconfig.kcfg +++ b/src/klamavconfig.kcfg @@ -21,7 +21,11 @@ - + + + + true + The maximum number of subdirectories in a zip file to open before . diff --git a/src/scanviewer.cpp b/src/scanviewer.cpp index c6efd93..7322524 100644 --- a/src/scanviewer.cpp +++ b/src/scanviewer.cpp @@ -418,6 +418,9 @@ void ScanViewer::slotScan(const TQStringList & filepattern, int mode, bool recur // if (KlamavConfig::virusLimitsExceeded()) // options += "--block-max "; + if (!(KlamavConfig::scanArchives())) + options += "--scan-archive=no "; + if (KlamavConfig::virusEncrypted()) options += "--alert-encrypted "; -- cgit v1.2.1