mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:38:12 +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:
parent
672b14b70d
commit
329cb134d6
4 changed files with 50 additions and 2 deletions
|
@ -50,6 +50,12 @@ public:
|
|||
return *m_locator;
|
||||
}
|
||||
|
||||
enum class ContinueDecision {
|
||||
No,
|
||||
Yes
|
||||
};
|
||||
ContinueDecision warn_unsaved_changes(const String& prompt);
|
||||
|
||||
private:
|
||||
static String get_full_path_of_serenity_source(const String& file);
|
||||
Vector<String> selected_file_paths() const;
|
||||
|
@ -112,6 +118,7 @@ private:
|
|||
void build(TerminalWrapper& wrapper);
|
||||
|
||||
void hide_action_tabs();
|
||||
bool any_document_is_dirty() const;
|
||||
|
||||
NonnullRefPtrVector<EditorWrapper> m_all_editor_wrappers;
|
||||
RefPtr<EditorWrapper> m_current_editor_wrapper;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue