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>
pull/24/head
Mavridis Philippe 3 years ago
parent bce9b7501c
commit 9976c0cfc6
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -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

@ -1,24 +1,45 @@
<!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">
<cstring>unnamed</cstring>
</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>
@ -32,7 +53,7 @@
</sizepolicy>
</property>
<property name="frameShape">
<enum>GroupBoxPanel</enum>
<enum>NoFrame</enum>
</property>
<property name="title">
<string>Archive Limits</string>

@ -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);
}

@ -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;

@ -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>

@ -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 ";

Loading…
Cancel
Save