Fixed tab duplication when closing through the Tabs menu.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/24/head
Mavridis Philippe 4 years ago
parent 336992a56d
commit eacf9e0adb
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -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();

Loading…
Cancel
Save