mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:38:10 +00:00
FontEditor: Warn on unsaved changes
Standardizes saving conventions: Editor now warns on close, new, and open if there are unsaved changes, and new files prompt to Save As.
This commit is contained in:
parent
67f81adc55
commit
8febfb169d
3 changed files with 102 additions and 11 deletions
|
@ -21,6 +21,8 @@ public:
|
|||
virtual ~FontEditorWidget() override;
|
||||
|
||||
bool save_as(const String&);
|
||||
bool request_close();
|
||||
void update_title();
|
||||
|
||||
const String& path() { return m_path; }
|
||||
const Gfx::BitmapFont& edited_font() { return *m_edited_font; }
|
||||
|
@ -38,6 +40,7 @@ private:
|
|||
void undo();
|
||||
void redo();
|
||||
void did_change_undo_stack();
|
||||
void did_modify_font();
|
||||
|
||||
RefPtr<Gfx::BitmapFont> m_edited_font;
|
||||
|
||||
|
@ -87,4 +90,6 @@ private:
|
|||
Vector<String> m_font_weight_list;
|
||||
Vector<String> m_font_type_list;
|
||||
bool m_font_metadata { true };
|
||||
bool m_font_modified { false };
|
||||
bool m_font_newly_opened { true };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue