From ba7a56ca7e0aed57b5955ae67d061c780c6a6588 Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 28 Jul 2024 15:33:29 +0300 Subject: [PATCH] update source storage on set markup --- .../Container/Page/Content/Gemtext.php | 22 +++++++++---------- .../Browser/Container/Page/Content/Plain.php | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Entity/Browser/Container/Page/Content/Gemtext.php b/src/Entity/Browser/Container/Page/Content/Gemtext.php index 2ed6acc6..195791fb 100644 --- a/src/Entity/Browser/Container/Page/Content/Gemtext.php +++ b/src/Entity/Browser/Container/Page/Content/Gemtext.php @@ -25,13 +25,13 @@ use \Yggverse\Net\Address; class Gemtext extends Markup { public function set( - string $value, + string $source, string | null &$title = null, bool $preformatted = false ): void { $document = new Document( - $value + $this->_source = $source ); $line = []; @@ -248,15 +248,6 @@ class Gemtext extends Markup ); } - protected function _onSizeAllocate( - GtkLabel $label, - GdkEvent $event - ): bool - { - // @TODO - return false; - } - protected function _onActivateLink( GtkLabel $label, string $href @@ -314,6 +305,15 @@ class Gemtext extends Markup return false; } + protected function _onSizeAllocate( + GtkLabel $label, + GdkEvent $event + ): bool + { + // @TODO + return false; + } + private function _wrap( string $value ): string diff --git a/src/Entity/Browser/Container/Page/Content/Plain.php b/src/Entity/Browser/Container/Page/Content/Plain.php index 96d1bcb5..4366a286 100644 --- a/src/Entity/Browser/Container/Page/Content/Plain.php +++ b/src/Entity/Browser/Container/Page/Content/Plain.php @@ -12,14 +12,14 @@ use \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Content\Markup; class Plain extends Markup { public function set( - string $value + string $source ): void { $this->gtk->set_markup( sprintf( '%s', htmlspecialchars( - $value + $this->_source = $source ) ) );