summaryrefslogtreecommitdiffstats
path: root/src/klamav.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/klamav.cpp')
-rw-r--r--src/klamav.cpp31
1 files changed, 27 insertions, 4 deletions
diff --git a/src/klamav.cpp b/src/klamav.cpp
index ab7d7a7..7499a9b 100644
--- a/src/klamav.cpp
+++ b/src/klamav.cpp
@@ -53,6 +53,7 @@ Klamav::Klamav()
fixedTabs << i18n("Scan") << i18n("Update");
tab = new TabWidget(this, "KlamAV", fixedTabs);
+ connect( tab, SIGNAL(tabClosed(TQString)), this, SLOT(tabClosed(TQString)) );
_tray = new KSystemTray(tdemain, "klamav tray");
_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
@@ -108,9 +109,9 @@ Klamav::Klamav()
top->setMenuBar(menubar);
- activityviewer = new Activityviewer(this);
+ activityviewer = new Activityviewer(this, "Events");
- aboutklamav = new Aboutklamav(this);
+ aboutklamav = new Aboutklamav(this, "Welcome");
updateTabState(0, true); // Welcome tab
klamscan = new Klamscan(this);
@@ -124,10 +125,10 @@ Klamav::Klamav()
- kuarantine = new Kuarantine(this);
+ kuarantine = new Kuarantine(this, "Quarantine");
updateTabState(1, true); // Quarantine tab
- klamdb = new KlamDB(this);
+ klamdb = new KlamDB(this, "DBViewer");
updateTabState(2, true); // Virus Browser tab
updateTabState(3, true); // Events tab
@@ -248,6 +249,28 @@ void Klamav::updateTabState( int tabId, bool init ) {
tabs_menu->setItemChecked(itemId, config->readBoolEntry(optionName, true) );
}
+void Klamav::tabClosed(TQString name) {
+ int uncheck;
+ TQString optionName;
+
+ if ( name == "Welcome" ) {
+ uncheck=showWelcomeTab;
+ optionName="ShowWelcomeTab";
+ } else if ( name == "Quarantine" ) {
+ uncheck=showQuarantineTab;
+ optionName="ShowQuarantineTab";
+ } else if ( name == "DBViewer" ) {
+ uncheck=showDBViewerTab;
+ optionName="ShowDBViewerTab";
+ } else if ( name == "Events" ) {
+ uncheck=showEventsTab;
+ optionName="ShowEventsTab";
+ }
+
+ tabs_menu->setItemChecked(uncheck, false);
+ config->writeEntry(optionName, false);
+}
+
// Menu slots
void Klamav::slotScanFile() {
klamscan->slotScanFile();