summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.in18
-rw-r--r--configure.in.in18
-rw-r--r--src/freshklam.cpp98
-rw-r--r--src/freshklam.h5
4 files changed, 2 insertions, 137 deletions
diff --git a/configure.in b/configure.in
index 5d7fc33..a371ac5 100644
--- a/configure.in
+++ b/configure.in
@@ -207,24 +207,6 @@ if test "$tempres" = "yes"; then
AC_DEFINE([SUPPORT_CLAMAV_V095],[],[Support ClamAV 0.95])
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
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ doc/Makefile ])
diff --git a/configure.in.in b/configure.in.in
index 055c222..c6a9050 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -142,21 +142,3 @@ if test "$tempres" = "yes"; then
AC_DEFINE([SUPPORT_CLAMAV_V095],[],[Support ClamAV 0.95])
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
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;