summaryrefslogtreecommitdiffstats
path: root/src/configdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/configdialog.cpp')
-rw-r--r--src/configdialog.cpp15
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 : [email protected]
***************************************************************************/
#include "configdialog.h"
+#include "backend.h"
#include "archivelimits.h"
#include "archivetypes.h"
#include "specialfiletypes.h"
@@ -30,6 +31,7 @@ email : [email protected]
#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 )