diff --git a/src/Entity/Window/Tab/Address.php b/src/Entity/Window/Tab/Address.php index 71055045..c88b4e2a 100644 --- a/src/Entity/Window/Tab/Address.php +++ b/src/Entity/Window/Tab/Address.php @@ -76,9 +76,7 @@ class Address ); // Update navbar elements - $this->navbar->base->update( - $address - ); + $this->navbar->base->refresh(); if ($history) { diff --git a/src/Entity/Window/Tab/Address/Navbar/Base.php b/src/Entity/Window/Tab/Address/Navbar/Base.php index 8de58fe7..b5ba2719 100644 --- a/src/Entity/Window/Tab/Address/Navbar/Base.php +++ b/src/Entity/Window/Tab/Address/Navbar/Base.php @@ -37,19 +37,19 @@ class Base extends \Yggverse\Yoda\Abstract\Entity\Window\Tab\Address\Navbar\Butt $this->update(); } - public function update( - ?\Yggverse\Net\Address $address = null - ): void + public function refresh(): void { - if (is_null($address)) - { - $address = new \Yggverse\Net\Address( - $this->navbar->request->gtk->get_text() - ); - } + $address = new \Yggverse\Net\Address( + rtrim( + $this->navbar->request->gtk->get_text(), + '/' + ) + ); $this->navbar->base->gtk->set_sensitive( - $address->getHost() && ($address->getPath() || $address->getQuery()) + $address->getHost() && ( + $address->getPath() || $address->getQuery() + ) ); } } \ No newline at end of file diff --git a/src/Entity/Window/Tab/Address/Navbar/Request.php b/src/Entity/Window/Tab/Address/Navbar/Request.php index a4451c8b..b8ebf413 100644 --- a/src/Entity/Window/Tab/Address/Navbar/Request.php +++ b/src/Entity/Window/Tab/Address/Navbar/Request.php @@ -20,7 +20,7 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Window\Tab\Address\Navbar\E \GdkEvent $event ): void { - $this->navbar->base->update(); + $this->navbar->base->refresh(); $this->navbar->go->gtk->set_sensitive( !empty(