mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
HackStudio: Display warning when opening binary files
We now detect and display a warning when we can't render the text of an opened file. Closes #5062.
This commit is contained in:
parent
3cc7b00e24
commit
dee0c46c9b
Notes:
sideshowbarker
2024-07-18 21:12:16 +09:00
Author: https://github.com/itamar8910
Commit: dee0c46c9b
Pull-request: https://github.com/SerenityOS/serenity/pull/5869
Issue: https://github.com/SerenityOS/serenity/issues/5062
5 changed files with 35 additions and 4 deletions
|
@ -42,6 +42,7 @@ public:
|
|||
}
|
||||
|
||||
const String& name() const { return m_name; }
|
||||
bool could_render_text() const { return m_could_render_text; }
|
||||
|
||||
GUI::TextDocument& document() const;
|
||||
CodeDocument& code_document() const;
|
||||
|
@ -57,6 +58,7 @@ private:
|
|||
|
||||
String m_name;
|
||||
mutable RefPtr<CodeDocument> m_document;
|
||||
mutable bool m_could_render_text { false };
|
||||
int m_vertical_scroll_value { 0 };
|
||||
int m_horizontal_scroll_value { 0 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue