From a48e4d87ed1da205feff1064938751936c366737 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 5 Jul 2024 02:40:48 +0300 Subject: [PATCH] rename setText to setValue --- src/Entity/Window/Tab/Address.php | 14 +++++++------- src/Entity/Window/Tab/Address/Title.php | 12 ++++++------ src/Entity/Window/Tab/History/Title.php | 12 ++++++------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/Entity/Window/Tab/Address.php b/src/Entity/Window/Tab/Address.php index 571865da..5a5958f3 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->setText( + $this->title->setValue( $address->getHost() ); @@ -125,7 +125,7 @@ class Address if ($title) // detect title by document h1 { - $this->title->setText( + $this->title->setValue( $title ); } @@ -138,7 +138,7 @@ class Address default: - $this->title->setText( + $this->title->setValue( 'Oops!' ); @@ -154,7 +154,7 @@ class Address else { - $this->title->setText( + $this->title->setValue( 'Failure' ); @@ -200,7 +200,7 @@ class Address if ($title) // detect title by document h1 { - $this->title->setText( + $this->title->setValue( $title ); } @@ -221,7 +221,7 @@ class Address else { - $this->title->setText( + $this->title->setValue( 'Failure' ); @@ -282,7 +282,7 @@ class Address default: - $this->title->setText( + $this->title->setValue( 'Oops!' ); diff --git a/src/Entity/Window/Tab/Address/Title.php b/src/Entity/Window/Tab/Address/Title.php index d536ec2d..27ae629f 100644 --- a/src/Entity/Window/Tab/Address/Title.php +++ b/src/Entity/Window/Tab/Address/Title.php @@ -13,7 +13,7 @@ class Title // Defaults private int $_ellipsize = 3; private int $_length = 12; - private string $_text = 'New address'; + private string $_value = 'New address'; public function __construct( \Yggverse\Yoda\Entity\Window\Tab\Address $address, @@ -21,7 +21,7 @@ class Title $this->address = $address; $this->gtk = new \GtkLabel( - $this->_text + $this->_value ); $this->gtk->set_width_chars( @@ -33,13 +33,13 @@ class Title ); } - public function setText( - ?string $text = null + public function setValue( + ?string $value = null ): void { $this->gtk->set_text( - is_null($text) ? $this->_text : trim( - $text + is_null($value) ? $this->_value : trim( + $value ) ); } diff --git a/src/Entity/Window/Tab/History/Title.php b/src/Entity/Window/Tab/History/Title.php index f66729c8..0f9f282a 100644 --- a/src/Entity/Window/Tab/History/Title.php +++ b/src/Entity/Window/Tab/History/Title.php @@ -13,7 +13,7 @@ class Title // Defaults private int $_ellipsize = 0; private int $_length = 12; - private string $_text = 'History'; + private string $_value = 'History'; public function __construct( \Yggverse\Yoda\Entity\Window\Tab\History $history @@ -21,7 +21,7 @@ class Title $this->history = $history; $this->gtk = new \GtkLabel( - $this->_text + $this->_value ); $this->gtk->set_width_chars( @@ -33,13 +33,13 @@ class Title ); } - public function setText( - ?string $text = null + public function setValue( + ?string $value = null ): void { $this->gtk->set_text( - is_null($text) ? $this->_text : trim( - $text + is_null($value) ? $this->_value : trim( + $value ) ); }