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>
pull/24/head
Mavridis Philippe 4 years ago
parent 05ad7bcb1f
commit 6e4fdca9cd
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -207,24 +207,6 @@ if test "$tempres" = "yes"; then
AC_DEFINE([SUPPORT_CLAMAV_V095],[],[Support ClamAV 0.95]) AC_DEFINE([SUPPORT_CLAMAV_V095],[],[Support ClamAV 0.95])
fi fi
dnl disable updates
# Whether we should use the disableupdates memory allocation debugging library.
AC_MSG_CHECKING(whether to use disable-updates (build KlamAV with GUI updates disabled ))
AC_ARG_WITH(disableupdates,
[ --with-disableupdates build KlamAV with GUI updates disabled . ],
[if [[ "$withval" = "yes" ]]; then
disableupdates=1
AC_MSG_RESULT(yes)
else
disableupdates=1
AC_MSG_RESULT(no)
fi], [ disableupdates=0; AC_MSG_RESULT(no) ]
)
if [[ $disableupdates -eq 1 ]]; then
AC_DEFINE(DISABLE_UPDATES, 1, "Define to disable gui updates")
fi
KDE_CREATE_SUBDIRSLIST KDE_CREATE_SUBDIRSLIST
AC_CONFIG_FILES([ Makefile ]) AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ doc/Makefile ]) AC_CONFIG_FILES([ doc/Makefile ])

@ -142,21 +142,3 @@ if test "$tempres" = "yes"; then
AC_DEFINE([SUPPORT_CLAMAV_V095],[],[Support ClamAV 0.95]) AC_DEFINE([SUPPORT_CLAMAV_V095],[],[Support ClamAV 0.95])
fi fi
dnl disable updates
# Whether we should use the disableupdates memory allocation debugging library.
AC_MSG_CHECKING(whether to use disable-updates (build KlamAV with GUI updates disabled ))
AC_ARG_WITH(disableupdates,
[ --with-disableupdates build KlamAV with GUI updates disabled . ],
[if [[ "$withval" = "yes" ]]; then
disableupdates=1
AC_MSG_RESULT(yes)
else
disableupdates=1
AC_MSG_RESULT(no)
fi], [ disableupdates=0; AC_MSG_RESULT(no) ]
)
if [[ $disableupdates -eq 1 ]]; then
AC_DEFINE(DISABLE_UPDATES, 1, "Define to disable gui updates")
fi

@ -84,7 +84,6 @@ Freshklam::Freshklam(TQWidget *parent, const char *name)
// updater->update(); // updater->update();
updater = new KlamavUpdate(this); updater = new KlamavUpdate(this);
connect( updater, SIGNAL( getCurrentVersionOfClamAV() ), SLOT( getCurrentVersionOfClamAV() ) ); 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(), TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "vbox"); 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 //Virus Database Directory
TQGroupBox *group = new TQGroupBox(i18n("Virus Database Directory"), this); TQGroupBox *group = new TQGroupBox(i18n("Virus Database Directory"), this);
vbox->addWidget(group); vbox->addWidget(group);
@ -363,18 +316,7 @@ void Freshklam::processOutput()
pos2 = item2.find('\n',pos); pos2 = item2.find('\n',pos);
TQString version = item2.mid((pos+20),pos2 - (pos+20)).stripWhiteSpace(); TQString version = item2.mid((pos+20),pos2 - (pos+20)).stripWhiteSpace();
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));
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));
} }
@ -724,20 +666,6 @@ void Freshklam::initCheckBoxes(){
check_combo->setEnabled(false); 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( daemon_box, SIGNAL(toggled(bool)), SLOT(handleChecks()) );
connect( check_combo, SIGNAL(activated(int)), SLOT(handleChecks()) ); connect( check_combo, SIGNAL(activated(int)), SLOT(handleChecks()) );
@ -760,18 +688,6 @@ void Freshklam::handleChecks(){
} }
config->writeEntry("NoOfUpdates", check_combo->currentText()); 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(); config->sync();
} }
@ -969,8 +885,7 @@ void
Freshklam::resolved( KResolverResults result) // SLOT Freshklam::resolved( KResolverResults result) // SLOT
{ {
if ((!( result.error() != KResolver::NoError || result.isEmpty() )) if ((!( result.error() != KResolver::NoError || result.isEmpty() )) ){
&& klamav_box->isChecked()){
updater->checkForNewKlamAV(); updater->checkForNewKlamAV();
}else }else
kdDebug() << "network error or not set to check for new klamav" << endl; 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" #include "freshklam.moc"

@ -114,7 +114,6 @@ public slots:
void slotCancel(); void slotCancel();
void checkForNewClamAVNow(); void checkForNewClamAVNow();
void getCurrentVersionOfClamAV( ); void getCurrentVersionOfClamAV( );
void toggleUpgradeButtons(bool);
private slots: private slots:
/* void slotProg();*/ /* void slotProg();*/
void childExited(); void childExited();
@ -160,8 +159,6 @@ private:
KURLRequester *dir_combo; KURLRequester *dir_combo;
KURLRequester *proxy_dir_combo; KURLRequester *proxy_dir_combo;
TQCheckBox *daemon_box; TQCheckBox *daemon_box;
TQCheckBox* clamav_box;
TQCheckBox* klamav_box;
TQCheckBox *recursive_box; TQCheckBox *recursive_box;
TQListBox *resultbox; TQListBox *resultbox;
TQLabel *status_label, *matches_label; TQLabel *status_label, *matches_label;
@ -189,8 +186,6 @@ private:
KResolver m_resolver; KResolver m_resolver;
/* TQString currentClamAVVersion; /* TQString currentClamAVVersion;
TDEHTMLPart *filelist;*/ TDEHTMLPart *filelist;*/
TQPushButton *clamav_options;
TQPushButton *klamav_options;
// private: // private:
// KDirLister clamav_lister; // KDirLister clamav_lister;

Loading…
Cancel
Save