Browse Source

update base refresh

PHP-GTK3
yggverse 4 months ago
parent
commit
c9aacdff4f
  1. 4
      src/Entity/Window/Tab/Address.php
  2. 20
      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 @@ -76,9 +76,7 @@ class Address
);
// Update navbar elements
$this->navbar->base->update(
$address
);
$this->navbar->base->refresh();
if ($history)
{

20
src/Entity/Window/Tab/Address/Navbar/Base.php

@ -37,19 +37,19 @@ class Base extends \Yggverse\Yoda\Abstract\Entity\Window\Tab\Address\Navbar\Butt @@ -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()
)
);
}
}

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 @@ -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(

Loading…
Cancel
Save