From e782204b43c1aac1197d07d694e5d3ced44c75b5 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 5 Jul 2024 02:33:01 +0300 Subject: [PATCH] use application setters --- src/Entity/Window/Tab/Address.php | 32 +++++++++---------- .../Window/Tab/Address/Content/Gemtext.php | 2 +- src/Entity/Window/Tab/Address/Navbar/Base.php | 2 +- src/Entity/Window/Tab/History/Content.php | 2 +- src/Entity/Window/Tab/History/Navbar/Open.php | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/Entity/Window/Tab/Address.php b/src/Entity/Window/Tab/Address.php index 66cd3e28..571865da 100644 --- a/src/Entity/Window/Tab/Address.php +++ b/src/Entity/Window/Tab/Address.php @@ -69,7 +69,7 @@ class Address ); // Update title - $this->title->gtk->set_text( + $this->title->setText( $address->getHost() ); @@ -93,7 +93,7 @@ class Address $this->navbar->address->tab->refresh(); // Update statusbar indicator - $this->statusbar->gtk->set_text( + $this->statusbar->setText( 'Loading...' ); @@ -125,12 +125,12 @@ class Address if ($title) // detect title by document h1 { - $this->title->gtk->set_text( + $this->title->setText( $title ); } - $this->statusbar->gtk->set_text( + $this->statusbar->setText( null ); @@ -138,7 +138,7 @@ class Address default: - $this->title->gtk->set_text( + $this->title->setText( 'Oops!' ); @@ -146,7 +146,7 @@ class Address 'File extension not supported' ); - $this->statusbar->gtk->set_text( + $this->statusbar->setText( null ); } @@ -154,7 +154,7 @@ class Address else { - $this->title->gtk->set_text( + $this->title->setText( 'Failure' ); @@ -162,7 +162,7 @@ class Address 'Could not open file' ); - $this->statusbar->gtk->set_text( + $this->statusbar->setText( 'Resource not found or not readable' ); } @@ -200,7 +200,7 @@ class Address if ($title) // detect title by document h1 { - $this->title->gtk->set_text( + $this->title->setText( $title ); } @@ -214,14 +214,14 @@ class Address ); } - $this->statusbar->gtk->set_text( + $this->statusbar->setText( $response->getMeta() ); } else { - $this->title->gtk->set_text( + $this->title->setText( 'Failure' ); @@ -234,7 +234,7 @@ class Address ) ); - $this->statusbar->gtk->set_text( + $this->statusbar->setText( 'Request failed' ); } @@ -258,7 +258,7 @@ class Address FILTER_FLAG_HOSTNAME ) ) { - $this->navbar->request->gtk->set_text( + $this->navbar->request->setValue( $address->get() ); } @@ -266,7 +266,7 @@ class Address // Search request else { - $this->navbar->request->gtk->set_text( + $this->navbar->request->setValue( sprintf( 'gemini://tlgs.one/search?%s', // @TODO custom provider urlencode( @@ -282,7 +282,7 @@ class Address default: - $this->title->gtk->set_text( + $this->title->setText( 'Oops!' ); @@ -295,7 +295,7 @@ class Address ) ); - $this->statusbar->gtk->set_text( + $this->statusbar->setText( null ); } diff --git a/src/Entity/Window/Tab/Address/Content/Gemtext.php b/src/Entity/Window/Tab/Address/Content/Gemtext.php index e377e03d..e3a9ac79 100644 --- a/src/Entity/Window/Tab/Address/Content/Gemtext.php +++ b/src/Entity/Window/Tab/Address/Content/Gemtext.php @@ -53,7 +53,7 @@ class Gemtext \GtkLabel $label, string $href ) { - $this->content->address->navbar->request->gtk->set_text( + $this->content->address->navbar->request->setValue( $this->_url( $href ) diff --git a/src/Entity/Window/Tab/Address/Navbar/Base.php b/src/Entity/Window/Tab/Address/Navbar/Base.php index b24b3222..8de58fe7 100644 --- a/src/Entity/Window/Tab/Address/Navbar/Base.php +++ b/src/Entity/Window/Tab/Address/Navbar/Base.php @@ -18,7 +18,7 @@ class Base extends \Yggverse\Yoda\Abstract\Entity\Window\Tab\Address\Navbar\Butt if ($address->getHost()) { - $this->navbar->request->gtk->set_text( + $this->navbar->request->setValue( $address->get( // build base true, true, diff --git a/src/Entity/Window/Tab/History/Content.php b/src/Entity/Window/Tab/History/Content.php index 05f26367..29142772 100644 --- a/src/Entity/Window/Tab/History/Content.php +++ b/src/Entity/Window/Tab/History/Content.php @@ -92,7 +92,7 @@ class Content $this->history->tab ); - $address->navbar->request->gtk->set_text( + $address->navbar->request->setValue( $this->getSelectedUrl() ); diff --git a/src/Entity/Window/Tab/History/Navbar/Open.php b/src/Entity/Window/Tab/History/Navbar/Open.php index c7e05d2e..e08f8a24 100644 --- a/src/Entity/Window/Tab/History/Navbar/Open.php +++ b/src/Entity/Window/Tab/History/Navbar/Open.php @@ -22,7 +22,7 @@ class Open extends \Yggverse\Yoda\Abstract\Entity\Window\Tab\History\Navbar\Butt $address ); - $address->navbar->request->gtk->set_text( + $address->navbar->request->setValue( $this->navbar->history->content->getSelectedUrl() );