From e43697ec0ccff6046e68e567e87addb2f425c5b1 Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 8 Jul 2024 03:11:21 +0300 Subject: [PATCH] use getValue API method --- src/Entity/Browser/Container/Tab/Page/Content.php | 8 +++----- src/Entity/Browser/Container/Tab/Page/Content/Data.php | 2 +- src/Entity/Browser/Container/Tab/Page/Navbar/Base.php | 8 ++------ src/Entity/Browser/Container/Tab/Page/Navbar/Go.php | 4 +--- src/Entity/Browser/History/Container/Content.php | 2 +- src/Entity/Browser/History/Container/Navbar/Search.php | 2 +- 6 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/Entity/Browser/Container/Tab/Page/Content.php b/src/Entity/Browser/Container/Tab/Page/Content.php index 37c9f33e..ee840355 100644 --- a/src/Entity/Browser/Container/Tab/Page/Content.php +++ b/src/Entity/Browser/Container/Tab/Page/Content.php @@ -83,7 +83,7 @@ class Content { // Parse address $address = new \Yggverse\Net\Address( - $this->page->navbar->request->gtk->get_text() + $this->page->navbar->request->getValue() ); // Init new title @@ -303,9 +303,7 @@ class Content $address = new \Yggverse\Net\Address( sprintf( 'gemini://%s', - trim( - $this->page->navbar->request->gtk->get_text() - ) + $this->page->navbar->request->getValue() ) ); @@ -328,7 +326,7 @@ class Content sprintf( 'gemini://tlgs.one/search?%s', // @TODO custom provider urlencode( - $this->page->navbar->request->gtk->get_text() + $this->page->navbar->request->getValue() ) ) ); diff --git a/src/Entity/Browser/Container/Tab/Page/Content/Data.php b/src/Entity/Browser/Container/Tab/Page/Content/Data.php index 015c92c2..8341e215 100644 --- a/src/Entity/Browser/Container/Tab/Page/Content/Data.php +++ b/src/Entity/Browser/Container/Tab/Page/Content/Data.php @@ -244,7 +244,7 @@ class Data { $address->toAbsolute( new Address( - $this->content->page->navbar->request->gtk->get_text() + $this->content->page->navbar->request->getValue() ) ); } diff --git a/src/Entity/Browser/Container/Tab/Page/Navbar/Base.php b/src/Entity/Browser/Container/Tab/Page/Navbar/Base.php index 3bcc61a1..3aaaf181 100644 --- a/src/Entity/Browser/Container/Tab/Page/Navbar/Base.php +++ b/src/Entity/Browser/Container/Tab/Page/Navbar/Base.php @@ -13,11 +13,7 @@ class Base extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Tab\Page\Nav ): void { $address = new \Yggverse\Net\Address( - trim( - strval( - $this->navbar->request->gtk->get_text() - ) - ) + $this->navbar->request->getValue() ); if ($address->getHost()) @@ -45,7 +41,7 @@ class Base extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Tab\Page\Nav { $address = new \Yggverse\Net\Address( rtrim( - $this->navbar->request->gtk->get_text(), + $this->navbar->request->getValue(), '/' ) ); diff --git a/src/Entity/Browser/Container/Tab/Page/Navbar/Go.php b/src/Entity/Browser/Container/Tab/Page/Navbar/Go.php index d09408d4..e59a2c40 100644 --- a/src/Entity/Browser/Container/Tab/Page/Navbar/Go.php +++ b/src/Entity/Browser/Container/Tab/Page/Navbar/Go.php @@ -19,9 +19,7 @@ class Go extends \Yggverse\Yoda\Abstract\Entity\Browser\Container\Tab\Page\Navba { $this->gtk->set_sensitive( !empty( - trim( - $this->navbar->request->gtk->get_text() - ) + $this->navbar->request->getValue() ) ); } diff --git a/src/Entity/Browser/History/Container/Content.php b/src/Entity/Browser/History/Container/Content.php index 54f4d1cc..a1e835df 100644 --- a/src/Entity/Browser/History/Container/Content.php +++ b/src/Entity/Browser/History/Container/Content.php @@ -103,7 +103,7 @@ class Content public function refresh(): void { $this->search( - $this->container->navbar->filter->gtk->get_text() + $this->container->navbar->filter->getValue() ); } } \ No newline at end of file diff --git a/src/Entity/Browser/History/Container/Navbar/Search.php b/src/Entity/Browser/History/Container/Navbar/Search.php index 973444bf..679ebc97 100644 --- a/src/Entity/Browser/History/Container/Navbar/Search.php +++ b/src/Entity/Browser/History/Container/Navbar/Search.php @@ -14,7 +14,7 @@ class Search extends \Yggverse\Yoda\Abstract\Entity\Browser\History\Container\Na ): void { $this->navbar->container->content->search( - $this->navbar->filter->gtk->get_text() + $this->navbar->filter->getValue() ); } }