summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/TextEditor.h
diff options
context:
space:
mode:
authorTimothy <timmot@users.noreply.github.com>2021-06-30 06:13:06 -0700
committerAndreas Kling <kling@serenityos.org>2021-07-10 15:33:46 +0200
commit73ae5200a9701f104726b673752752250beafa4d (patch)
treebd021cab74749eb840ddddc88c1cdb536ab53e6c /Userland/Libraries/LibGUI/TextEditor.h
parent41ce2debda1de75f80a4971afbf5ec7dcddf5ba3 (diff)
downloadserenity-73ae5200a9701f104726b673752752250beafa4d.zip
TextEditor+LibGUI: Use unveil and FileSystemAccessServer
Making use of the new FileSystemAccessServer we are able to use unveil without restricting our ability to open and save files. A file argument will be unveiled automatically however all other files require user action via the FileSystemAccessServer to gain access.
Diffstat (limited to 'Userland/Libraries/LibGUI/TextEditor.h')
-rw-r--r--Userland/Libraries/LibGUI/TextEditor.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/TextEditor.h b/Userland/Libraries/LibGUI/TextEditor.h
index ecbbf53eae..a287c0c6b1 100644
--- a/Userland/Libraries/LibGUI/TextEditor.h
+++ b/Userland/Libraries/LibGUI/TextEditor.h
@@ -116,7 +116,8 @@ public:
TextRange normalized_selection() const { return m_selection.normalized(); }
void insert_at_cursor_or_replace_selection(const StringView&);
- bool write_to_file(const String& path);
+ bool write_to_file(String const& path);
+ bool write_to_file_and_close(int fd);
bool has_selection() const { return m_selection.is_valid(); }
String selected_text() const;
size_t number_of_selected_words() const;