diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-02-05 22:31:58 +0200 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2021-02-05 22:34:25 +0200 |
commit | 18923e403764c902e11aa2c8cd49c6f7335a9923 (patch) | |
tree | 708bc47445e10d6a95beda5c4178e9e17c272dc4 /src/configdialog.cpp | |
parent | 3f7deb35938a8993ee835e05de9bc2cddfe05744 (diff) | |
download | klamav-18923e403764c902e11aa2c8cd49c6f7335a9923.tar.gz klamav-18923e403764c902e11aa2c8cd49c6f7335a9923.zip |
Added support for clamd scanning.
This option has to be enabled in the new 'Backend' section of the
Options dialog.
Most configuration options are unavailable for use with 'clamdscan'.
For more information on the inherited limitations see the man page
for clamdscan(1).
This resolves issue #17.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'src/configdialog.cpp')
-rw-r--r-- | src/configdialog.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/configdialog.cpp b/src/configdialog.cpp index d59d52d..94466db 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -14,6 +14,7 @@ email : markey@web.de ***************************************************************************/ #include "configdialog.h" +#include "backend.h" #include "archivelimits.h" #include "archivetypes.h" #include "specialfiletypes.h" @@ -30,6 +31,7 @@ email : markey@web.de #include <tqobjectlist.h> #include <tqpushbutton.h> #include <tqradiobutton.h> +#include <tqcheckbox.h> #include <tqspinbox.h> #include <tqtextcodec.h> #include <tqtooltip.h> @@ -52,6 +54,7 @@ KlamavConfigDialog::KlamavConfigDialog( TQWidget *parent, const char* name, TDEC setWFlags( WDestructiveClose ); // 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_archivetypes = new ArchiveTypes( 0, "Archive Types" ); m_emailprotection = new Sigtool ( 0, "E-mail protection" ); @@ -60,6 +63,10 @@ KlamavConfigDialog::KlamavConfigDialog( TQWidget *parent, const char* name, TDEC m_logoptions = new LogOptions( 0, "Event Logging" ); // add pages + addPage( m_klambackend, i18n( "Backend" ), "system-run", i18n( "Configure Scanning Backend" ) ); + 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_archivetypes, i18n( "Archive Types" ), "application-x-tarz", i18n( "Configure Archive Types" ) ); addPage( m_emailprotection, i18n( "E-mail protection" ), "email", i18n( "Set up your e-mail client to use Klammail" ) ); @@ -85,7 +92,13 @@ KlamavConfigDialog::~KlamavConfigDialog() { } - +void KlamavConfigDialog::slotToggleClamdscan(bool on) +{ + m_klambackend->kcfg_ClamdMultiscan->setEnabled(on); + m_archivelimits->setEnabled(!on); + m_archivetypes->setEnabled(!on); + m_specialfiletypes->setEnabled(!on); +} /** Show page by object name */ void KlamavConfigDialog::showPage( const TQCString& page ) |