summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-01-13 22:37:04 +0200
committerMavridis Philippe <mavridisf@gmail.com>2021-01-13 22:37:04 +0200
commit6e4fdca9cd1c36a2e62f8b6c5a5b3eff591ffa19 (patch)
treea4e68efd9167edb85641290b1e897d3ea7c200f2 /src
parent05ad7bcb1f26af286e1bd6ecf3b104c821ee2749 (diff)
downloadklamav-6e4fdca9cd1c36a2e62f8b6c5a5b3eff591ffa19.tar.gz
klamav-6e4fdca9cd1c36a2e62f8b6c5a5b3eff591ffa19.zip
Removed software updates.
ClamAV updates must be left to the user (or, even better, each distribution's package manager). Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/freshklam.cpp98
-rw-r--r--src/freshklam.h5
2 files changed, 2 insertions, 101 deletions
diff --git a/src/freshklam.cpp b/src/freshklam.cpp
index 341564e..7f279e2 100644
--- a/src/freshklam.cpp
+++ b/src/freshklam.cpp
@@ -84,7 +84,6 @@ Freshklam::Freshklam(TQWidget *parent, const char *name)
// updater->update();
updater = new KlamavUpdate(this);
connect( updater, SIGNAL( getCurrentVersionOfClamAV() ), SLOT( getCurrentVersionOfClamAV() ) );
- connect( updater, SIGNAL( toggleUpgradeButtons(bool) ), SLOT( toggleUpgradeButtons(bool) ) );
@@ -113,52 +112,6 @@ Freshklam::Freshklam(TQWidget *parent, const char *name)
TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "vbox");
- //Proxy Widget
- TQGroupBox *software_group = new TQGroupBox(i18n("Software Updates"), this);
- vbox->addWidget(software_group);
-
-
- TQGridLayout *software_layout = new TQGridLayout( software_group, 5, 2, KDialog::spacingHint(),
- KDialog::spacingHint(), "software_layout");
- software_layout->addRowSpacing(0, software_group->fontMetrics().height());
- software_layout->setColStretch(0, 1);
- software_layout->setColStretch(1, 1);
-
-
- //Dazuko
- TQWidget *dazuko_hlp = new TQWidget( software_group );
- software_layout->addMultiCellWidget(dazuko_hlp, 1,2, 0,2);
- TQGridLayout *dazuko_dir_layout = new TQGridLayout(dazuko_hlp,2,2, KDialog::spacingHint() );
-
-
- clamav_box = new TQCheckBox(i18n("Update ClamAV Automatically"), dazuko_hlp);
- clamav_box->setMinimumWidth(clamav_box->sizeHint().width());
- dazuko_dir_layout->addWidget(clamav_box,0,0);
-
- klamav_box = new TQCheckBox(i18n("Update KlamAV Automatically"), dazuko_hlp);
- klamav_box->setMinimumWidth(klamav_box->sizeHint().width());
- dazuko_dir_layout->addWidget(klamav_box,0,1);
-
-
-
- clamav_options = new TQPushButton (i18n( "Upgrade ClamAV Now" ), dazuko_hlp);
- dazuko_dir_layout->addWidget(clamav_options,1,0);
- clamav_options->setFixedSize(clamav_options->sizeHint());
- connect( clamav_options, SIGNAL( clicked() ), this,
- SLOT( checkForNewClamAVNow() ) );
-
- klamav_options = new TQPushButton (i18n( "Upgrade KlamAV Now" ), dazuko_hlp);
- dazuko_dir_layout->addWidget(klamav_options,1,1);
- klamav_options->setFixedSize(klamav_options->sizeHint());
- connect( klamav_options, SIGNAL( clicked() ), this,
- SLOT( checkForNewKlamAVNow() ) );
-
-#ifdef DISABLE_UPDATES
- clamav_box->setEnabled(false);
- klamav_box->setEnabled(false);
- clamav_options->setEnabled(false);
- klamav_options->setEnabled(false);
-#endif
//Virus Database Directory
TQGroupBox *group = new TQGroupBox(i18n("Virus Database Directory"), this);
vbox->addWidget(group);
@@ -363,18 +316,7 @@ void Freshklam::processOutput()
pos2 = item2.find('\n',pos);
TQString version = item2.mid((pos+20),pos2 - (pos+20)).stripWhiteSpace();
- if ((clamav_box->isChecked())){
-
- int result = KMessageBox::warningContinueCancel(this, i18n( "It looks like your version of the ClamAV engine is out of date! ClamAV-%1 is the most recent version of ClamAV available. Would you like to KlamAV to download and compile it for you?").arg(version),i18n( "Download and Install ClamAV-%1" ).arg(version),i18n( "Download and Install ClamAV-%1" ).arg(version));
-
- switch (result) {
- case 2 :
- break;
- case 5 :
- updater->downloadComponent("clamav",version,"tar.gz");
- }
- }else if (!(clamav_box->isChecked()))
- KNotifyClient::event(tdemain->_tray->winId(),"ClamAVOutDated", TQString("Your copy of ClamAV is out of date! Please Upgrade to ClamAV %1!").arg(version));
+ KNotifyClient::event(tdemain->_tray->winId(),"ClamAVOutDated", TQString("Your copy of ClamAV is out of date! Please Upgrade to ClamAV %1!").arg(version));
}
@@ -724,20 +666,6 @@ void Freshklam::initCheckBoxes(){
check_combo->setEnabled(false);
}
- if ((config->readEntry("AutoUpdateClamAV")) == "Yes"){
- clamav_box->setChecked(true);
- }else{
- clamav_box->setChecked(false);
- }
-
- if ((config->readEntry("AutoUpdateKlamAV")) == "Yes"){
- klamav_box->setChecked(true);
- }else{
- klamav_box->setChecked(false);
- }
-
- connect( clamav_box, SIGNAL(toggled(bool)), SLOT(handleChecks()) );
- connect( klamav_box, SIGNAL(toggled(bool)), SLOT(handleChecks()) );
connect( daemon_box, SIGNAL(toggled(bool)), SLOT(handleChecks()) );
connect( check_combo, SIGNAL(activated(int)), SLOT(handleChecks()) );
@@ -760,18 +688,6 @@ void Freshklam::handleChecks(){
}
config->writeEntry("NoOfUpdates", check_combo->currentText());
- if (clamav_box->isChecked()){
- config->writeEntry("AutoUpdateClamAV","Yes");
- }else{
- config->writeEntry("AutoUpdateClamAV","No");
- }
-
- if (klamav_box->isChecked()){
- config->writeEntry("AutoUpdateKlamAV","Yes");
- }else{
- config->writeEntry("AutoUpdateKlamAV","No");
- }
-
config->sync();
}
@@ -969,8 +885,7 @@ void
Freshklam::resolved( KResolverResults result) // SLOT
{
- if ((!( result.error() != KResolver::NoError || result.isEmpty() ))
- && klamav_box->isChecked()){
+ if ((!( result.error() != KResolver::NoError || result.isEmpty() )) ){
updater->checkForNewKlamAV();
}else
kdDebug() << "network error or not set to check for new klamav" << endl;
@@ -1028,13 +943,4 @@ void Freshklam::readVersionLine(KProcIO *)
}
-void Freshklam::toggleUpgradeButtons(bool state)
-{
-
- klamav_options->setEnabled(state);
- clamav_options->setEnabled(state);
-
-
-}
-
#include "freshklam.moc"
diff --git a/src/freshklam.h b/src/freshklam.h
index f6a4bf9..ee01247 100644
--- a/src/freshklam.h
+++ b/src/freshklam.h
@@ -114,7 +114,6 @@ public slots:
void slotCancel();
void checkForNewClamAVNow();
void getCurrentVersionOfClamAV( );
- void toggleUpgradeButtons(bool);
private slots:
/* void slotProg();*/
void childExited();
@@ -160,8 +159,6 @@ private:
KURLRequester *dir_combo;
KURLRequester *proxy_dir_combo;
TQCheckBox *daemon_box;
- TQCheckBox* clamav_box;
- TQCheckBox* klamav_box;
TQCheckBox *recursive_box;
TQListBox *resultbox;
TQLabel *status_label, *matches_label;
@@ -189,8 +186,6 @@ private:
KResolver m_resolver;
/* TQString currentClamAVVersion;
TDEHTMLPart *filelist;*/
- TQPushButton *clamav_options;
- TQPushButton *klamav_options;
// private:
// KDirLister clamav_lister;