summaryrefslogtreecommitdiff
path: root/Userland/DevTools
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2022-02-14 13:28:09 +0100
committerAndreas Kling <kling@serenityos.org>2022-02-15 02:32:52 +0100
commitdb299e9804d7895a4756bd4a4448caf7de5b4c21 (patch)
treeccbc49d0eaed765587a3169b6a76c7569faecddd /Userland/DevTools
parentdcc2568439c2f7086acf57fad2c6796e9bd599ce (diff)
downloadserenity-db299e9804d7895a4756bd4a4448caf7de5b4c21.zip
Playground: Add editor actions to the window menu
Diffstat (limited to 'Userland/DevTools')
-rw-r--r--Userland/DevTools/Playground/main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Userland/DevTools/Playground/main.cpp b/Userland/DevTools/Playground/main.cpp
index a32328f66f..d71fb5c876 100644
--- a/Userland/DevTools/Playground/main.cpp
+++ b/Userland/DevTools/Playground/main.cpp
@@ -214,6 +214,17 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
})));
auto edit_menu = TRY(window->try_add_menu("&Edit"));
+ TRY(edit_menu->try_add_action(editor->undo_action()));
+ TRY(edit_menu->try_add_action(editor->redo_action()));
+ TRY(edit_menu->try_add_separator());
+ TRY(edit_menu->try_add_action(editor->cut_action()));
+ TRY(edit_menu->try_add_action(editor->copy_action()));
+ TRY(edit_menu->try_add_action(editor->paste_action()));
+ TRY(edit_menu->try_add_separator());
+ TRY(edit_menu->try_add_action(editor->select_all_action()));
+ TRY(edit_menu->try_add_action(editor->go_to_line_action()));
+ TRY(edit_menu->try_add_separator());
+
TRY(edit_menu->try_add_action(GUI::Action::create("&Format GML", { Mod_Ctrl | Mod_Shift, Key_I }, [&](auto&) {
auto formatted_gml_or_error = GUI::GML::format_gml(editor->text());
if (!formatted_gml_or_error.is_error()) {