mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
rename deletePage to closePage, remove gtk node on apply
This commit is contained in:
parent
1d1c7bf669
commit
3d48e20809
2 changed files with 9 additions and 4 deletions
|
|
@ -72,7 +72,7 @@ class Tab
|
||||||
?\GtkWidget $child,
|
?\GtkWidget $child,
|
||||||
int $page_num
|
int $page_num
|
||||||
) {
|
) {
|
||||||
$this->deletePage(
|
$this->closePage(
|
||||||
$page_num
|
$page_num
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -152,7 +152,7 @@ class Tab
|
||||||
return $this->_page[$page_num];
|
return $this->_page[$page_num];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deletePage(
|
public function closePage(
|
||||||
int $page_num
|
int $page_num
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
|
|
@ -161,10 +161,15 @@ class Tab
|
||||||
throw new \Exception;
|
throw new \Exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove GTK node
|
||||||
|
$this->gtk->remove_page(
|
||||||
|
$page_num
|
||||||
|
);
|
||||||
|
|
||||||
// Free memory
|
// Free memory
|
||||||
$this->_page[$page_num] = null;
|
$this->_page[$page_num] = null;
|
||||||
|
|
||||||
// Remove internal record
|
// Cleanup internal record
|
||||||
unset(
|
unset(
|
||||||
$this->_page[$page_num]
|
$this->_page[$page_num]
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class Close
|
||||||
'activate',
|
'activate',
|
||||||
function()
|
function()
|
||||||
{
|
{
|
||||||
$this->tab->menu->browser->container->tab->gtk->remove_page(
|
$this->tab->menu->browser->container->tab->closePage(
|
||||||
$this->tab->menu->browser->container->tab->gtk->get_current_page()
|
$this->tab->menu->browser->container->tab->gtk->get_current_page()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue