diff --git a/src/Entity/Browser/Container/Tab.php b/src/Entity/Browser/Container/Tab.php index fc2181de..ca932af8 100644 --- a/src/Entity/Browser/Container/Tab.php +++ b/src/Entity/Browser/Container/Tab.php @@ -241,6 +241,14 @@ class Tab } } + public function clean(): void + { + while ($this->pages) + { + $this->close(); + } + } + public function reorder(): void { // Init new index diff --git a/src/Entity/Browser/Menu/Tab/Clean.php b/src/Entity/Browser/Menu/Tab/Clean.php index aa02c58a..edaf93b0 100644 --- a/src/Entity/Browser/Menu/Tab/Clean.php +++ b/src/Entity/Browser/Menu/Tab/Clean.php @@ -62,12 +62,7 @@ class Clean if (GtkResponseType::OK == $dialog->run()) { - foreach ($this->tab->menu->browser->container->tab->pages as $page_num => $page) - { - $this->tab->menu->browser->container->tab->close( - $page_num - ); - } + $this->tab->menu->browser->container->tab->clean(); } $dialog->destroy();