summaryrefslogtreecommitdiffstats
path: root/src/klamav.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-02-14 18:42:34 +0200
committerMavridis Philippe <mavridisf@gmail.com>2021-02-14 18:49:22 +0200
commiteacf9e0adbf7ec4ee903e82b3b84b4770ae02476 (patch)
treeada75e4c0e28f233cbd8a9e9e900ba0be300f7c5 /src/klamav.cpp
parent336992a56d17142139d0df812103a64f9ef06378 (diff)
downloadklamav-eacf9e0adbf7ec4ee903e82b3b84b4770ae02476.tar.gz
klamav-eacf9e0adbf7ec4ee903e82b3b84b4770ae02476.zip
Fixed tab duplication when closing through the Tabs menu.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'src/klamav.cpp')
-rw-r--r--src/klamav.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/klamav.cpp b/src/klamav.cpp
index dbe311c..6c191f7 100644
--- a/src/klamav.cpp
+++ b/src/klamav.cpp
@@ -267,7 +267,8 @@ void Klamav::tabClosed(TQString name) {
optionName="ShowEventsTab";
}
- tabs_menu->setItemChecked(uncheck, false);
+ tabs_menu->setItemChecked(uncheck, false);
+ config->setGroup("Tabs");
config->writeEntry(optionName, false);
}
@@ -288,6 +289,9 @@ void Klamav::slotOptions() {
}
void Klamav::slotToggleWelcome() {
+ if( config->group() != "Tabs" )
+ config->setGroup("Tabs");
+
bool newState = ! config->readBoolEntry("ShowWelcomeTab", true);
config->writeEntry("ShowWelcomeTab", newState);
config->sync();
@@ -295,6 +299,9 @@ void Klamav::slotToggleWelcome() {
updateTabState(0, false);
}
void Klamav::slotToggleQuarantine() {
+ if( config->group() != "Tabs" )
+ config->setGroup("Tabs");
+
bool newState = ! config->readBoolEntry("ShowQuarantineTab", true);
config->writeEntry("ShowQuarantineTab", newState);
config->sync();
@@ -302,6 +309,9 @@ void Klamav::slotToggleQuarantine() {
updateTabState(1, false);
}
void Klamav::slotToggleDBViewer() {
+ if( config->group() != "Tabs" )
+ config->setGroup("Tabs");
+
bool newState = ! config->readBoolEntry("ShowDBViewerTab", true);
config->writeEntry("ShowDBViewerTab", newState);
config->sync();
@@ -309,6 +319,9 @@ void Klamav::slotToggleDBViewer() {
updateTabState(2, false);
}
void Klamav::slotToggleEvents() {
+ if( config->group() != "Tabs" )
+ config->setGroup("Tabs");
+
bool newState = ! config->readBoolEntry("ShowEventsTab", true);
config->writeEntry("ShowEventsTab", newState);
config->sync();