From 9b5c434ad1a2f1664eaaee4867b4de05761d2022 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 12 Jul 2024 18:54:17 +0300 Subject: [PATCH] complete save to file action --- src/Entity/Browser/Menu/File/Save.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Entity/Browser/Menu/File/Save.php b/src/Entity/Browser/Menu/File/Save.php index 195e446d..f6f5ce1f 100644 --- a/src/Entity/Browser/Menu/File/Save.php +++ b/src/Entity/Browser/Menu/File/Save.php @@ -58,10 +58,13 @@ class Save if (\GtkResponseType::APPLY == $dialog->run()) { - file_put_contents( - $dialog->get_filename(), - '' // @TODO get active tab content - ); + if ($page = $this->file->menu->browser->container->tab->getPage()) + { + file_put_contents( + $dialog->get_filename(), + $page->content->data->raw + ); + } } $dialog->destroy();