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"; optionName="ShowEventsTab";
} }
tabs_menu->setItemChecked(uncheck, false); tabs_menu->setItemChecked(uncheck, false);
config->setGroup("Tabs");
config->writeEntry(optionName, false); config->writeEntry(optionName, false);
} }
@ -288,6 +289,9 @@ void Klamav::slotOptions() {
} }
void Klamav::slotToggleWelcome() { void Klamav::slotToggleWelcome() {
if( config->group() != "Tabs" )
config->setGroup("Tabs");
bool newState = ! config->readBoolEntry("ShowWelcomeTab", true); bool newState = ! config->readBoolEntry("ShowWelcomeTab", true);
config->writeEntry("ShowWelcomeTab", newState); config->writeEntry("ShowWelcomeTab", newState);
config->sync(); config->sync();
@ -295,6 +299,9 @@ void Klamav::slotToggleWelcome() {
updateTabState(0, false); updateTabState(0, false);
} }
void Klamav::slotToggleQuarantine() { void Klamav::slotToggleQuarantine() {
if( config->group() != "Tabs" )
config->setGroup("Tabs");
bool newState = ! config->readBoolEntry("ShowQuarantineTab", true); bool newState = ! config->readBoolEntry("ShowQuarantineTab", true);
config->writeEntry("ShowQuarantineTab", newState); config->writeEntry("ShowQuarantineTab", newState);
config->sync(); config->sync();
@ -302,6 +309,9 @@ void Klamav::slotToggleQuarantine() {
updateTabState(1, false); updateTabState(1, false);
} }
void Klamav::slotToggleDBViewer() { void Klamav::slotToggleDBViewer() {
if( config->group() != "Tabs" )
config->setGroup("Tabs");
bool newState = ! config->readBoolEntry("ShowDBViewerTab", true); bool newState = ! config->readBoolEntry("ShowDBViewerTab", true);
config->writeEntry("ShowDBViewerTab", newState); config->writeEntry("ShowDBViewerTab", newState);
config->sync(); config->sync();
@ -309,6 +319,9 @@ void Klamav::slotToggleDBViewer() {
updateTabState(2, false); updateTabState(2, false);
} }
void Klamav::slotToggleEvents() { void Klamav::slotToggleEvents() {
if( config->group() != "Tabs" )
config->setGroup("Tabs");
bool newState = ! config->readBoolEntry("ShowEventsTab", true); bool newState = ! config->readBoolEntry("ShowEventsTab", true);
config->writeEntry("ShowEventsTab", newState); config->writeEntry("ShowEventsTab", newState);
config->sync(); config->sync();

Loading…
Cancel
Save