mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user