From aea00e602fea247ac6931652e260ce067b096610 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 5 Jul 2024 02:28:52 +0300 Subject: [PATCH] implement setText method --- src/Entity/Window/Tab/Address/Statusbar.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Entity/Window/Tab/Address/Statusbar.php b/src/Entity/Window/Tab/Address/Statusbar.php index 0c39695..888e04f 100644 --- a/src/Entity/Window/Tab/Address/Statusbar.php +++ b/src/Entity/Window/Tab/Address/Statusbar.php @@ -12,6 +12,7 @@ class Statusbar // Defaults private int $_margin = 8; + private string $_text = ''; public function __construct( \Yggverse\Yoda\Entity\Window\Tab\Address $address @@ -48,4 +49,15 @@ class Statusbar $this->_margin ); } + + public function setText( + ?string $text = null + ): void + { + $this->gtk->set_text( + is_null($text) ? $this->_text : trim( + $text + ) + ); + } } \ No newline at end of file