diff options
Diffstat (limited to 'src/klamd.cpp')
-rw-r--r-- | src/klamd.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/klamd.cpp b/src/klamd.cpp index f8b6c89..e6d6859 100644 --- a/src/klamd.cpp +++ b/src/klamd.cpp @@ -10,21 +10,21 @@ -#include <klocale.h> +#include <tdelocale.h> #include <kiconloader.h> -#include <kio/netaccess.h> +#include <tdeio/netaccess.h> #include <karrowbutton.h> -#include <kaction.h> +#include <tdeaction.h> #include <tqcheckbox.h> #include <kbuttonbox.h> #include <kprocio.h> #include <kurlrequester.h> #include <tqlayout.h> -#include <kmessagebox.h> -#include <ktempfile.h> +#include <tdemessagebox.h> +#include <tdetempfile.h> #include <ksystemtray.h> #include <tqtoolbutton.h> #include <knotifyclient.h> @@ -98,7 +98,7 @@ Klamd::Klamd(TQWidget *_parent, const char *name) sessionslb = new MyListBox(hlp); - config = KGlobal::config(); + config = TDEGlobal::config(); config->setGroup("Klamd"); includePaths = config->readListEntry("IncludePaths"); if (!(includePaths.isEmpty())) @@ -146,7 +146,7 @@ Klamd::Klamd(TQWidget *_parent, const char *name) sessionslb2 = new MyListBox(hlp2); - //config = KGlobal::config(); + //config = TDEGlobal::config(); config->setGroup("Klamd"); excludePaths = config->readListEntry("ExcludePaths"); if (!(excludePaths.isEmpty())) @@ -266,7 +266,7 @@ Klamd::Klamd(TQWidget *_parent, const char *name) connect( cancel_button, SIGNAL(clicked()), SLOT(slotCancel()) ); */ - if (KApplication::kApplication()->isRestored()) + if (TDEApplication::kApplication()->isRestored()) restoreKlamd(); // KStdAction::quit(this, SLOT(hide()), actionCollection()); @@ -282,7 +282,7 @@ Klamd::~Klamd() } if (!(tempFileName.isEmpty())) - KIO::NetAccess::del(tempFileName,NULL); + TDEIO::NetAccess::del(tempFileName,NULL); } @@ -306,14 +306,14 @@ void Klamd::processOutput() tmpVirusName.replace("FOUND",""); CollectionDB::instance()->insertEvent("Virus Found",tmpVirusName,tmpFName); if (recursive_box1->isChecked()) - KNotifyClient::event(kmain->_tray->winId(),i18n( "ScanCompleteNoVirus" ), i18n( "Virus %1 Found In %2 by Auto-Scan!" ).arg(tmpVirusName).arg(tmpFName)); + KNotifyClient::event(tdemain->_tray->winId(),i18n( "ScanCompleteNoVirus" ), i18n( "Virus %1 Found In %2 by Auto-Scan!" ).arg(tmpVirusName).arg(tmpFName)); if (recursive_box->isChecked()) Quarantine(tmpFName.stripWhiteSpace(),tmpVirusName.stripWhiteSpace()); } if ((pos = (item2.find("ERROR: Clamuko: Can't register with Dazuko"))) != -1){ finish(); KMessageBox::information (this,i18n( "Can't Start On-Access Scanning! Check you have read permissions on file /dev/dazuko.") ); - KNotifyClient::event(kmain->_tray->winId(),i18n( "Can't Start On-Access Scanning!" ), i18n( "Check you have read permissions on file /dev/dazuko." )); + KNotifyClient::event(tdemain->_tray->winId(),i18n( "Can't Start On-Access Scanning!" ), i18n( "Check you have read permissions on file /dev/dazuko." )); return; } @@ -333,7 +333,7 @@ void Klamd::processOutput() bool Klamd::startKlamd() { - config = KGlobal::config(); + config = TDEGlobal::config(); config->setGroup("Klamd"); if ((config->readListEntry("IncludePaths")).isEmpty()){ KMessageBox::information (this,i18n("You haven't specified any paths to scan. Select the directories you want to KlamAV to keep an eye on and try again.")); @@ -361,12 +361,12 @@ void Klamd::finish() { search_button->setEnabled(true); cancel_button->setEnabled(false); - //config = KGlobal::config(); - if (!KApplication::kApplication()->closingDown()){ + //config = TDEGlobal::config(); + if (!TDEApplication::kApplication()->closingDown()){ config->setGroup("Klamd"); config->writeEntry("Enabled", "No"); } - kmain->clamdStopped(); + tdemain->clamdStopped(); buf += '\n'; if (childproc){ @@ -379,7 +379,7 @@ void Klamd::finish() klamdAlive = FALSE; enableInputs(); if (!(tempFileName.isEmpty())) - KIO::NetAccess::del(tempFileName,NULL); + TDEIO::NetAccess::del(tempFileName,NULL); } @@ -400,7 +400,7 @@ void Klamd::childExited() // // kdDebug() << "klamd status" << status << endl; - kmain->contextDisable(); + tdemain->contextDisable(); KMessageBox::information (this,i18n( "The auto-scan process died unexpectedly!") ); @@ -438,7 +438,7 @@ void Klamd::slotAddIncludeDir() if ((includePaths.contains(filepa) == 0) && (excludePaths.contains(filepa) == 0)){ sessionslb->insertItem(filepa); - //config = KGlobal::config(); + //config = TDEGlobal::config(); config->setGroup("Klamd"); if (includePaths.contains(filepa) == 0) { @@ -465,7 +465,7 @@ void Klamd::slotDelIncludeDir() sessionslb->removeItem(sessionslb->currentItem()); - //config = KGlobal::config(); + //config = TDEGlobal::config(); config->setGroup("Klamd"); config->writeEntry("IncludePaths", includePaths); config->sync(); @@ -487,7 +487,7 @@ void Klamd::slotAddExcludeDir() if ((includePaths.contains(filepa) == 0) && (excludePaths.contains(filepa) == 0)){ sessionslb2->insertItem(filepa); - //config = KGlobal::config(); + //config = TDEGlobal::config(); config->setGroup("Klamd"); if (excludePaths.contains(filepa) == 0) { @@ -513,7 +513,7 @@ void Klamd::slotDelExcludeDir() sessionslb2->removeItem(sessionslb2->currentItem()); - //config = KGlobal::config(); + //config = TDEGlobal::config(); config->setGroup("Klamd"); config->writeEntry("ExcludePaths", excludePaths); config->sync(); @@ -535,7 +535,7 @@ void Klamd::writeConf() } - //config = KGlobal::config(); + //config = TDEGlobal::config(); config->setGroup("Kuarantine"); TQStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); TQString quarloc; @@ -543,7 +543,7 @@ void Klamd::writeConf() quarloc = *ita; } - TQString db = kmain->freshklam->getCurrentDBDir(); + TQString db = tdemain->freshklam->getCurrentDBDir(); //tf->setAutoDelete(TRUE); @@ -613,7 +613,7 @@ void Klamd::writeConf() void Klamd::Quarantine(TQString fname, TQString virusname){ - //config = KGlobal::config(); + //config = TDEGlobal::config(); config->setGroup("Kuarantine"); //object.replace("Clamuko:",""); //object = object.stripWhiteSpace(); @@ -695,7 +695,7 @@ void Klamd::Quarantine(TQString fname, TQString virusname){ config->writeEntry(TQString("Items %1").arg(quarloc), lastQuarItems); //config->sync(); - //kmain->kuarantine->refresh(); + //tdemain->kuarantine->refresh(); //kdDebug() << "finished klamd quar" << endl; } @@ -726,10 +726,10 @@ int Klamd::runDazuko(bool caller){ connect( lsmodproc, SIGNAL(readReady(KProcIO *)), SLOT(checkForDazuko()) ); if (caller){ - connect( lsmodproc, SIGNAL(processExited(KProcess *)), + connect( lsmodproc, SIGNAL(processExited(TDEProcess *)), SLOT(lsmodOutput()) ); }else{ - connect( lsmodproc, SIGNAL(processExited(KProcess *)), + connect( lsmodproc, SIGNAL(processExited(TDEProcess *)), SLOT(lsmodCheck()) ); } @@ -767,7 +767,7 @@ void Klamd::loadKlamd() klamdAlive = TRUE; - //TQString suCommand=TQString("kdesu -t -c '" +clamdcommand+" -c '%1'").arg(tempFileName)+"'"; + //TQString suCommand=TQString("tdesu -t -c '" +clamdcommand+" -c '%1'").arg(tempFileName)+"'"; TQString suCommand=TQString(clamdcommand+" -c '%1'").arg(tempFileName); childproc = new KProcIO(); childproc->setUseShell(TRUE); @@ -782,19 +782,19 @@ void Klamd::loadKlamd() connect( childproc, SIGNAL(readReady(KProcIO *)), SLOT(receivedOutput(KProcIO *)) ); childproc->start(KProcIO::NotifyOnExit); - connect( childproc, SIGNAL(processExited(KProcess *)), + connect( childproc, SIGNAL(processExited(TDEProcess *)), SLOT(childExited()) ); search_button->setEnabled(false); cancel_button->setEnabled(true); -/* if (kmain->freshklam->isFreshklamAlive()) - kmain->_tray->setPixmap(KSystemTray::loadIcon("klamavdl")); +/* if (tdemain->freshklam->isFreshklamAlive()) + tdemain->_tray->setPixmap(KSystemTray::loadIcon("klamavdl")); else*/ - kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav")); - kmain->EnableKlamd->setEnabled(FALSE); - kmain->DisableKlamd->setEnabled(TRUE); - //config = KGlobal::config(); + tdemain->_tray->setPixmap(KSystemTray::loadIcon("klamav")); + tdemain->EnableKlamd->setEnabled(FALSE); + tdemain->DisableKlamd->setEnabled(TRUE); + //config = TDEGlobal::config(); config->setGroup("Klamd"); config->writeEntry("Enabled", "Yes"); config->sync(); @@ -826,9 +826,9 @@ void Klamd::loadDazuko() insmodproc->setEnvironment("PATH",curpath + ":/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin"); insmodproc->setUseShell(TRUE); - *insmodproc<<"kdesu -i klamav"<<"-c"<<insmodCommand; + *insmodproc<<"tdesu -i klamav"<<"-c"<<insmodCommand; - connect( insmodproc, SIGNAL(processExited(KProcess *)), + connect( insmodproc, SIGNAL(processExited(TDEProcess *)), SLOT(moduleLoaded()) ); insmodproc->start(KProcIO::NotifyOnExit); @@ -878,7 +878,7 @@ void Klamd::checkForDazuko() void Klamd::restoreKlamd(){ - config = KGlobal::config(); + config = TDEGlobal::config(); config->setGroup("Klamd"); TQString RunKlamd = config->readEntry("Enabled"); @@ -890,7 +890,7 @@ void Klamd::restoreKlamd(){ void Klamd::handleChecks(){ - //config = KGlobal::config(); + //config = TDEGlobal::config(); config->setGroup("Klamd"); if (recursive_box->isChecked()) config->writeEntry("Quarantine","Yes"); @@ -925,7 +925,7 @@ TQString Klamd::getKlamdConfFile(){ void Klamd::slotAdvOptions(){ -/* config = KGlobal::config(); +/* config = TDEGlobal::config(); config->setGroup("Klamd"); TQString RunKlamd = config->readEntry("Enabled"); @@ -938,7 +938,7 @@ void Klamd::slotAdvOptions(){ dialog->raise(); dialog->setActiveWindow();*/ - kmain->slotConfigKlamav( "Auto-Scan" ); + tdemain->slotConfigKlamav( "Auto-Scan" ); } |