diff --git a/src/Entity/Browser/Container/Tab.php b/src/Entity/Browser/Container/Tab.php index 6a1025b7..c9e9b498 100644 --- a/src/Entity/Browser/Container/Tab.php +++ b/src/Entity/Browser/Container/Tab.php @@ -72,7 +72,9 @@ class Tab ?\GtkWidget $child, int $page_num ) { - // @TODO + $this->deletePage( + $page_num + ); } ); @@ -149,4 +151,24 @@ class Tab return $this->_page[$page_num]; } + + public function deletePage( + int $page_num + ): void + { + if (empty($this->_page[$page_num])) + { + throw new \Exception; + } + + // Free memory + $this->_page[$page_num] = null; + + // Remove internal record + unset( + $this->_page[$page_num] + ); + + // Reorder @TODO + } } \ No newline at end of file