1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:27:35 +00:00

HackStudio: Show dialog on build and exit if there are unsaved changes

If the user tries to exit HackStudio, or build the project, when there
are unsaved changes in some of the editors, A Yes/No/Cancel dialog will
be shown.
This commit is contained in:
Itamar 2021-05-01 13:42:07 +03:00 committed by Andreas Kling
parent 672b14b70d
commit 329cb134d6
4 changed files with 50 additions and 2 deletions

View file

@ -37,7 +37,8 @@ public:
void set_mode_displayable();
void set_mode_non_displayable();
void set_filename(const String&);
const String& filename() const {return m_filename;}
const String& filename() const { return m_filename; }
bool document_dirty() const { return m_document_dirty; }
private:
EditorWrapper();
@ -48,7 +49,7 @@ private:
RefPtr<GUI::Label> m_filename_label;
RefPtr<GUI::Label> m_cursor_label;
RefPtr<Editor> m_editor;
bool m_document_dirty {false};
bool m_document_dirty { false };
};
}