mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
rename methods, use namespace
This commit is contained in:
parent
9cc75a8fcf
commit
b8b59e6f56
9 changed files with 20 additions and 20 deletions
|
|
@ -197,7 +197,7 @@ class Page
|
|||
);
|
||||
|
||||
// Refresh header by new title if current page is active
|
||||
if ($this === $this->container->tab->getPage())
|
||||
if ($this === $this->container->tab->get())
|
||||
{
|
||||
$this->container->browser->header->setTitle(
|
||||
$this->title->getValue(),
|
||||
|
|
@ -231,7 +231,7 @@ class Page
|
|||
);
|
||||
|
||||
// Refresh header by new title if current page is active
|
||||
if ($this === $this->container->tab->getPage())
|
||||
if ($this === $this->container->tab->get())
|
||||
{
|
||||
$this->container->browser->header->setTitle(
|
||||
$this->title->getValue(),
|
||||
|
|
@ -264,7 +264,7 @@ class Page
|
|||
);
|
||||
|
||||
// Refresh header by new title if current page is active
|
||||
if ($this === $this->container->tab->getPage())
|
||||
if ($this === $this->container->tab->get())
|
||||
{
|
||||
$this->container->browser->header->setTitle(
|
||||
$this->title->getValue()
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class Content
|
|||
);
|
||||
|
||||
// Refresh header by new title if current page is active
|
||||
if ($this->page === $this->page->container->tab->getPage())
|
||||
if ($this->page === $this->page->container->tab->get())
|
||||
{
|
||||
$this->page->container->browser->header->setTitle(
|
||||
$this->page->title->getValue(),
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb
|
|||
$entry->get_text()
|
||||
);
|
||||
|
||||
$this->navbar->page->container->tab->updateSession();
|
||||
$this->navbar->page->container->tab->update();
|
||||
}
|
||||
|
||||
protected function _onKeyRelease(
|
||||
|
|
@ -26,7 +26,7 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb
|
|||
{
|
||||
$this->navbar->refresh();
|
||||
|
||||
$this->navbar->page->container->tab->updateSession();
|
||||
$this->navbar->page->container->tab->update();
|
||||
}
|
||||
|
||||
protected function _onChanged(
|
||||
|
|
@ -40,7 +40,7 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Navb
|
|||
1000, // wait for one second to apply changes
|
||||
function()
|
||||
{
|
||||
$this->navbar->page->container->tab->updateSession();
|
||||
$this->navbar->page->container->tab->update();
|
||||
|
||||
return false; // stop
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class Tab
|
|||
// Restore previous session
|
||||
foreach ($this->container->browser->database->getSession() as $session)
|
||||
{
|
||||
$this->appendPage(
|
||||
$this->append(
|
||||
$session->request,
|
||||
boolval( // open
|
||||
parse_url(
|
||||
|
|
@ -56,7 +56,7 @@ class Tab
|
|||
int $page_num
|
||||
) {
|
||||
// Update header bar title
|
||||
if ($page = $this->getPage($page_num))
|
||||
if ($page = $this->get($page_num))
|
||||
{
|
||||
$this->container->browser->header->setTitle(
|
||||
$page->title->getValue(),
|
||||
|
|
@ -117,7 +117,7 @@ class Tab
|
|||
);
|
||||
}
|
||||
|
||||
public function appendPage(
|
||||
public function append(
|
||||
?string $request = null,
|
||||
bool $open = true,
|
||||
bool $focus = true
|
||||
|
|
@ -167,9 +167,9 @@ class Tab
|
|||
$this->gtk->show();
|
||||
}
|
||||
|
||||
public function getPage(
|
||||
public function get(
|
||||
?int $page_num = null
|
||||
): ?\Yggverse\Yoda\Entity\Browser\Container\Page
|
||||
): ?Page
|
||||
{
|
||||
// Get current page number on $page_num is null
|
||||
if (is_null($page_num))
|
||||
|
|
@ -197,7 +197,7 @@ class Tab
|
|||
?int $page_num = null
|
||||
): void
|
||||
{
|
||||
if ($page = $this->getPage($page_num))
|
||||
if ($page = $this->get($page_num))
|
||||
{
|
||||
$this->gtk->remove_page(
|
||||
$this->gtk->page_num(
|
||||
|
|
@ -246,11 +246,11 @@ class Tab
|
|||
// Update session
|
||||
if ($session)
|
||||
{
|
||||
$this->updateSession();
|
||||
$this->update();
|
||||
}
|
||||
}
|
||||
|
||||
public function updateSession(): void
|
||||
public function update(): void
|
||||
{
|
||||
$pid = pcntl_fork();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue