mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 08:20:44 +00:00
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.
This commit is contained in:
parent
41ce2debda
commit
73ae5200a9
Notes:
sideshowbarker
2024-07-18 09:25:53 +09:00
Author: https://github.com/timmot
Commit: 73ae5200a9
Pull-request: https://github.com/SerenityOS/serenity/pull/7964
Reviewed-by: https://github.com/MaxWipfli
Reviewed-by: https://github.com/gunnarbeutner
6 changed files with 109 additions and 18 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue