mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +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
|
@ -719,6 +719,11 @@ InsertTextCommand::InsertTextCommand(TextDocument& document, const String& text,
|
|||
{
|
||||
}
|
||||
|
||||
String InsertTextCommand::action_text() const
|
||||
{
|
||||
return "Insert Text";
|
||||
}
|
||||
|
||||
bool InsertTextCommand::merge_with(GUI::Command const& other)
|
||||
{
|
||||
if (!is<InsertTextCommand>(other))
|
||||
|
@ -804,6 +809,11 @@ RemoveTextCommand::RemoveTextCommand(TextDocument& document, const String& text,
|
|||
{
|
||||
}
|
||||
|
||||
String RemoveTextCommand::action_text() const
|
||||
{
|
||||
return "Remove Text";
|
||||
}
|
||||
|
||||
bool RemoveTextCommand::merge_with(GUI::Command const& other)
|
||||
{
|
||||
if (!is<RemoveTextCommand>(other))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue