mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:17:46 +00:00
LibGUI: Show command name in GUI::TextEditor undo/redo action text
We can now show things like "Undo Insert Text" and "Redo Remove Text" instead of just "Undo" and "Redo" in menu items. Pretty neat! :^)
This commit is contained in:
parent
c670d8c56d
commit
ce90d87eb6
3 changed files with 27 additions and 0 deletions
|
@ -113,6 +113,8 @@ public:
|
|||
void undo();
|
||||
void redo();
|
||||
|
||||
UndoStack const& undo_stack() const { return m_undo_stack; }
|
||||
|
||||
void notify_did_change();
|
||||
void set_all_cursors(const TextPosition&);
|
||||
|
||||
|
@ -207,6 +209,7 @@ public:
|
|||
virtual void undo() override;
|
||||
virtual void redo() override;
|
||||
virtual bool merge_with(GUI::Command const&) override;
|
||||
virtual String action_text() const override;
|
||||
const String& text() const { return m_text; }
|
||||
const TextRange& range() const { return m_range; }
|
||||
|
||||
|
@ -222,6 +225,7 @@ public:
|
|||
virtual void redo() override;
|
||||
const TextRange& range() const { return m_range; }
|
||||
virtual bool merge_with(GUI::Command const&) override;
|
||||
virtual String action_text() const override;
|
||||
|
||||
private:
|
||||
String m_text;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue