From 1727dd04bef054a96568c98083fa0d2d75f5ee6e Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 5 Jul 2024 04:26:34 +0300 Subject: [PATCH] implement refresh method --- src/Entity/Window/Tab/Address/Navbar/Go.php | 11 +++++++++++ src/Entity/Window/Tab/Address/Navbar/Request.php | 6 +----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Entity/Window/Tab/Address/Navbar/Go.php b/src/Entity/Window/Tab/Address/Navbar/Go.php index 2f9993dc..901b40c8 100644 --- a/src/Entity/Window/Tab/Address/Navbar/Go.php +++ b/src/Entity/Window/Tab/Address/Navbar/Go.php @@ -14,4 +14,15 @@ class Go extends \Yggverse\Yoda\Abstract\Entity\Window\Tab\Address\Navbar\Button { $this->navbar->address->update(); } + + public function refresh(): void + { + $this->gtk->set_sensitive( + !empty( + trim( + $this->navbar->request->gtk->get_text() + ) + ) + ); + } } \ 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 b8ebf413..66205a97 100644 --- a/src/Entity/Window/Tab/Address/Navbar/Request.php +++ b/src/Entity/Window/Tab/Address/Navbar/Request.php @@ -22,10 +22,6 @@ class Request extends \Yggverse\Yoda\Abstract\Entity\Window\Tab\Address\Navbar\E { $this->navbar->base->refresh(); - $this->navbar->go->gtk->set_sensitive( - !empty( - $entry->get_text() - ) - ); + $this->navbar->go->refresh(); } } \ No newline at end of file