diff --git a/config.json b/config.json index a0a9f9d..593059f 100644 --- a/config.json +++ b/config.json @@ -86,8 +86,7 @@ }, "database": { - "enabled":true, - "timeout":null + "enabled":true } }, "progressbar": @@ -178,6 +177,10 @@ { "enabled":true, "label":"History", + "clean": + { + "timeout":null + }, "time": { "format":"c" diff --git a/src/Entity/Tab/History.php b/src/Entity/Tab/History.php index f1726ba..01d2991 100644 --- a/src/Entity/Tab/History.php +++ b/src/Entity/Tab/History.php @@ -33,6 +33,14 @@ class History // Init config $this->config = \Yggverse\Yoda\Model\File::getConfig()->app->tab->history; + // Cleanup expired history + if ($this->config->clean->timeout) + { + $this->app->database->cleanHistory( + $this->config->clean->timeout + ); + } + // Compose header $this->header = new \GtkBox( \GtkOrientation::HORIZONTAL