Browse Source

update base refresh

PHP-GTK3
yggverse 4 months ago
parent
commit
c9aacdff4f
  1. 4
      src/Entity/Window/Tab/Address.php
  2. 16
      src/Entity/Window/Tab/Address/Navbar/Base.php
  3. 2
      src/Entity/Window/Tab/Address/Navbar/Request.php

4
src/Entity/Window/Tab/Address.php

@ -76,9 +76,7 @@ class Address
); );
// Update navbar elements // Update navbar elements
$this->navbar->base->update( $this->navbar->base->refresh();
$address
);
if ($history) if ($history)
{ {

16
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(); $this->update();
} }
public function update( public function refresh(): void
?\Yggverse\Net\Address $address = null
): void
{
if (is_null($address))
{ {
$address = new \Yggverse\Net\Address( $address = new \Yggverse\Net\Address(
$this->navbar->request->gtk->get_text() rtrim(
$this->navbar->request->gtk->get_text(),
'/'
)
); );
}
$this->navbar->base->gtk->set_sensitive( $this->navbar->base->gtk->set_sensitive(
$address->getHost() && ($address->getPath() || $address->getQuery()) $address->getHost() && (
$address->getPath() || $address->getQuery()
)
); );
} }
} }

2
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 \GdkEvent $event
): void ): void
{ {
$this->navbar->base->update(); $this->navbar->base->refresh();
$this->navbar->go->gtk->set_sensitive( $this->navbar->go->gtk->set_sensitive(
!empty( !empty(

Loading…
Cancel
Save