|
|
|
@ -55,22 +55,22 @@ Klamav::Klamav()
|
|
|
|
|
fixedTabs << i18n("Scan") << i18n("Update");
|
|
|
|
|
|
|
|
|
|
tab = new TabWidget(this, "KlamAV", fixedTabs);
|
|
|
|
|
connect( tab, SIGNAL(tabClosed(TQString)), this, SLOT(tabClosed(TQString)) );
|
|
|
|
|
connect( tab, TQ_SIGNAL(tabClosed(TQString)), this, TQ_SLOT(tabClosed(TQString)) );
|
|
|
|
|
|
|
|
|
|
_tray = new KSystemTray(tdemain, "klamav tray");
|
|
|
|
|
_tray->setPixmap( KSystemTray::loadIcon("klamav") );
|
|
|
|
|
connect(_tray,SIGNAL(quitSelected()),SLOT(shuttingDown()));
|
|
|
|
|
connect(_tray,TQ_SIGNAL(quitSelected()),TQ_SLOT(shuttingDown()));
|
|
|
|
|
|
|
|
|
|
TDEPopupMenu *conf_menu = _tray->contextMenu();
|
|
|
|
|
|
|
|
|
|
EnableFreshklam = new TDEAction(i18n("&Enable Auto-Updates"), "system-software-update", 0,this, SLOT(contextEnableFK()),actionCollection(),"fk_enable");
|
|
|
|
|
DisableFreshklam = new TDEAction(i18n("&Disable Auto-Updates"), 0, 0, this, SLOT(contextDisableFK()),actionCollection(),"fk_disable");
|
|
|
|
|
EnableFreshklam = new TDEAction(i18n("&Enable Auto-Updates"), "system-software-update", 0,this, TQ_SLOT(contextEnableFK()),actionCollection(),"fk_enable");
|
|
|
|
|
DisableFreshklam = new TDEAction(i18n("&Disable Auto-Updates"), 0, 0, this, TQ_SLOT(contextDisableFK()),actionCollection(),"fk_disable");
|
|
|
|
|
|
|
|
|
|
EnableFreshklam->plug(conf_menu);
|
|
|
|
|
DisableFreshklam->plug(conf_menu);
|
|
|
|
|
|
|
|
|
|
EnableKlamOnAcc = new TDEAction(i18n("&Start On-Access Scanner"), "filefind", 0,this, SLOT(contextEnableKOA()),actionCollection(),"koa_enable");
|
|
|
|
|
DisableKlamOnAcc = new TDEAction(i18n("&Stop On-Access Scanner"), 0, 0, this, SLOT(contextDisableKOA()),actionCollection(),"koa_disable");
|
|
|
|
|
EnableKlamOnAcc = new TDEAction(i18n("&Start On-Access Scanner"), "filefind", 0,this, TQ_SLOT(contextEnableKOA()),actionCollection(),"koa_enable");
|
|
|
|
|
DisableKlamOnAcc = new TDEAction(i18n("&Stop On-Access Scanner"), 0, 0, this, TQ_SLOT(contextDisableKOA()),actionCollection(),"koa_disable");
|
|
|
|
|
|
|
|
|
|
EnableKlamOnAcc->plug(conf_menu);
|
|
|
|
|
DisableKlamOnAcc->plug(conf_menu);
|
|
|
|
@ -95,20 +95,20 @@ Klamav::Klamav()
|
|
|
|
|
|
|
|
|
|
// Menus
|
|
|
|
|
TDEPopupMenu *scanner_menu = new TDEPopupMenu(this);
|
|
|
|
|
scanner_menu->insertItem( SmallIcon("document-open"), i18n("Scan &File..."), this, SLOT(slotScanFile()), CTRL+Key_O );
|
|
|
|
|
scanner_menu->insertItem( SmallIcon("folder_open"), i18n("Scan &Directory..."), this, SLOT(slotScanDir()) );
|
|
|
|
|
scanner_menu->insertItem( SmallIcon("document-open"), i18n("Scan &File..."), this, TQ_SLOT(slotScanFile()), CTRL+Key_O );
|
|
|
|
|
scanner_menu->insertItem( SmallIcon("folder_open"), i18n("Scan &Directory..."), this, TQ_SLOT(slotScanDir()) );
|
|
|
|
|
scanner_menu->insertSeparator();
|
|
|
|
|
scanner_menu->insertItem( SmallIcon("xclock"), i18n("&Schedule scan..."), this, SLOT(slotScheduleScan()) );
|
|
|
|
|
scanner_menu->insertItem( SmallIcon("configure"), i18n("&Options..."), this, SLOT(slotOptions()) );
|
|
|
|
|
scanner_menu->insertItem( SmallIcon("xclock"), i18n("&Schedule scan..."), this, TQ_SLOT(slotScheduleScan()) );
|
|
|
|
|
scanner_menu->insertItem( SmallIcon("configure"), i18n("&Options..."), this, TQ_SLOT(slotOptions()) );
|
|
|
|
|
scanner_menu->insertSeparator();
|
|
|
|
|
scanner_menu->insertItem( SmallIcon("application-exit"), i18n("&Quit"), kapp, SLOT(quit()) );
|
|
|
|
|
scanner_menu->insertItem( SmallIcon("application-exit"), i18n("&Quit"), kapp, TQ_SLOT(quit()) );
|
|
|
|
|
|
|
|
|
|
tabs_menu = new TDEPopupMenu(this);
|
|
|
|
|
tabs_menu->setCheckable(true);
|
|
|
|
|
showWelcomeTab = tabs_menu->insertItem( SmallIcon("klamav"), i18n("Show &Welcome tab"), this, SLOT(slotToggleWelcome()) );
|
|
|
|
|
showQuarantineTab = tabs_menu->insertItem( SmallIcon("encrypted"), i18n("Show &Quarantine tab"), this, SLOT(slotToggleQuarantine()) );
|
|
|
|
|
showDBViewerTab = tabs_menu->insertItem( SmallIcon("system-search"), i18n("Show &Virus Browser tab"), this, SLOT(slotToggleDBViewer()) );
|
|
|
|
|
showEventsTab = tabs_menu->insertItem( SmallIcon("toggle_log"), i18n("Show &Events tab"), this, SLOT(slotToggleEvents()) );
|
|
|
|
|
showWelcomeTab = tabs_menu->insertItem( SmallIcon("klamav"), i18n("Show &Welcome tab"), this, TQ_SLOT(slotToggleWelcome()) );
|
|
|
|
|
showQuarantineTab = tabs_menu->insertItem( SmallIcon("encrypted"), i18n("Show &Quarantine tab"), this, TQ_SLOT(slotToggleQuarantine()) );
|
|
|
|
|
showDBViewerTab = tabs_menu->insertItem( SmallIcon("system-search"), i18n("Show &Virus Browser tab"), this, TQ_SLOT(slotToggleDBViewer()) );
|
|
|
|
|
showEventsTab = tabs_menu->insertItem( SmallIcon("toggle_log"), i18n("Show &Events tab"), this, TQ_SLOT(slotToggleEvents()) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Menu bar
|
|
|
|
@ -130,8 +130,8 @@ Klamav::Klamav()
|
|
|
|
|
freshklam = new Freshklam(this);
|
|
|
|
|
tab->addTab(freshklam, i18n("Update"));
|
|
|
|
|
|
|
|
|
|
connect(freshklam->search_button,SIGNAL(clicked()),SLOT(contextUpdateFK()));
|
|
|
|
|
connect(freshklam->cancel_button,SIGNAL(clicked()),SLOT(contextDisableFK()));
|
|
|
|
|
connect(freshklam->search_button,TQ_SIGNAL(clicked()),TQ_SLOT(contextUpdateFK()));
|
|
|
|
|
connect(freshklam->cancel_button,TQ_SIGNAL(clicked()),TQ_SLOT(contextDisableFK()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -148,13 +148,13 @@ Klamav::Klamav()
|
|
|
|
|
|
|
|
|
|
// On-Access scanner
|
|
|
|
|
klamonacc = new KlamOnAcc(this);
|
|
|
|
|
connect( klamonacc, SIGNAL(stateUpdated()), this, SLOT(slotKOAStateUpdate()) );
|
|
|
|
|
connect( klamonacc, TQ_SIGNAL(stateUpdated()), this, TQ_SLOT(slotKOAStateUpdate()) );
|
|
|
|
|
|
|
|
|
|
slotKOAStateUpdate(); // initial state
|
|
|
|
|
|
|
|
|
|
connect(tab,SIGNAL(currentChanged ( TQWidget * ) ),klamdb,SLOT(shouldIShow(TQWidget *)));
|
|
|
|
|
connect(tab,TQ_SIGNAL(currentChanged ( TQWidget * ) ),klamdb,TQ_SLOT(shouldIShow(TQWidget *)));
|
|
|
|
|
|
|
|
|
|
KStdAction::quit(this, SLOT(shuttingDown()), actionCollection());
|
|
|
|
|
KStdAction::quit(this, TQ_SLOT(shuttingDown()), actionCollection());
|
|
|
|
|
|
|
|
|
|
if (TDEApplication::kApplication()->isRestored()){
|
|
|
|
|
hide();
|
|
|
|
@ -488,7 +488,7 @@ void Klamav::slotConfigKlamav( const TQCString& page )
|
|
|
|
|
{
|
|
|
|
|
//TDEConfigDialog didn't find an instance of this dialog, so lets create it :
|
|
|
|
|
dialog = new KlamavConfigDialog( this, "settings", KlamavConfig::self() );
|
|
|
|
|
//connect( dialog, SIGNAL(settingsChanged()), SLOT(applySettings()) );
|
|
|
|
|
//connect( dialog, TQ_SIGNAL(settingsChanged()), TQ_SLOT(applySettings()) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//FIXME it seems that if the dialog is on a different desktop it gets lost
|
|
|
|
|