mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02: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:
Notes:
sideshowbarker
2024-07-18 18:46:05 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/329cb134d6f Pull-request: https://github.com/SerenityOS/serenity/pull/6779 Reviewed-by: https://github.com/IdanHo Reviewed-by: https://github.com/awesomekling
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user