1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 05:45:07 +00:00

TextEditor: Add a "document dirty" flag and show it in the window title

This lets you know if the document has been modified since last save.
This commit is contained in:
Andreas Kling 2019-08-27 20:18:19 +02:00
parent fcf85d8fef
commit ecbedda34c
2 changed files with 24 additions and 2 deletions

View file

@ -19,6 +19,7 @@ public:
private:
void set_path(const FileSystemPath& file);
void update_title();
GTextEditor* m_editor { nullptr };
String m_path;
@ -37,4 +38,6 @@ private:
GButton* m_find_previous_button { nullptr };
GButton* m_find_next_button { nullptr };
GWidget* m_find_widget { nullptr };
bool m_document_dirty { false };
};