summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-02-07 21:53:39 +0200
committerMavridis Philippe <mavridisf@gmail.com>2021-02-07 21:55:06 +0200
commit9976c0cfc6516af25dd26ccba03e389781431825 (patch)
treeb3e88fea61c8b8c699db079bff3acada197303cb /src
parentbce9b7501ce96635e4c1c27093abe1aaae9a34b4 (diff)
downloadklamav-9976c0cfc6516af25dd26ccba03e389781431825.tar.gz
klamav-9976c0cfc6516af25dd26ccba03e389781431825.zip
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 <mavridisf@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/archives.ui (renamed from src/archivelimits.ui)33
-rw-r--r--src/configdialog.cpp8
-rw-r--r--src/configdialog.h2
-rw-r--r--src/klamavconfig.kcfg6
-rw-r--r--src/scanviewer.cpp3
6 files changed, 41 insertions, 13 deletions
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/archives.ui
index 5aac2d8..af27882 100644
--- a/src/archivelimits.ui
+++ b/src/archives.ui
@@ -1,19 +1,19 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>ArchiveLimits</class>
+<class>ArchiveOptions</class>
<widget class="TQWidget">
<property name="name">
- <cstring>ArchiveLimits</cstring>
+ <cstring>ArchiveOptionss</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>827</width>
- <height>299</height>
+ <width>436</width>
+ <height>282</height>
</rect>
</property>
<property name="caption">
- <string>Archive Limits</string>
+ <string>Archive Options</string>
</property>
<vbox>
<property name="name">
@@ -21,6 +21,27 @@
</property>
<widget class="TQGroupBox">
<property name="name">
+ <cstring>groupBox4</cstring>
+ </property>
+ <property name="title">
+ <string>Archive Scanning</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQCheckBox">
+ <property name="name">
+ <cstring>kcfg_scanArchives</cstring>
+ </property>
+ <property name="text">
+ <string>Scan archives</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="TQGroupBox">
+ <property name="name">
<cstring>LimitsGroup</cstring>
</property>
<property name="sizePolicy">
@@ -32,7 +53,7 @@
</sizepolicy>
</property>
<property name="frameShape">
- <enum>GroupBoxPanel</enum>
+ <enum>NoFrame</enum>
</property>
<property name="title">
<string>Archive Limits</string>
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 @@
</entry>
</group>
-<group name="ArchiveLimits">
+<group name="Archives">
+ <entry name="scanArchives" type="Bool">
+ <label>Look into archives while scanning</label>
+ <default>true</default>
+ </entry>
<entry name="RecursionLevel" type="Int">
<label>Maximum Recursion Level</label>
<whatsthis>The maximum number of subdirectories in a zip file to open before .</whatsthis>
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 ";