1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:57:42 +00:00

TextEditor: Added GCommonActions

This commit is contained in:
rhin123 2019-09-04 16:33:52 -05:00 committed by Andreas Kling
parent 3261ffb2fd
commit 5594f19624

View file

@ -47,22 +47,19 @@ void GTextEditor::create_actions()
}, },
this); this);
m_cut_action = GAction::create( m_cut_action = GCommonActions::make_cut_action([&] {
"Cut", { Mod_Ctrl, Key_X }, GraphicsBitmap::load_from_file("/res/icons/cut16.png"), [&](const GAction&) { cut();
cut(); },
},
this); this);
m_copy_action = GAction::create( m_copy_action = GCommonActions::make_copy_action([&] {
"Copy", { Mod_Ctrl, Key_C }, GraphicsBitmap::load_from_file("/res/icons/16x16/edit-copy.png"), [&](const GAction&) { copy();
copy(); },
},
this); this);
m_paste_action = GAction::create( m_paste_action = GCommonActions::make_paste_action([&] {
"Paste", { Mod_Ctrl, Key_V }, GraphicsBitmap::load_from_file("/res/icons/paste16.png"), [&](const GAction&) { paste();
paste(); },
},
this); this);
m_delete_action = GAction::create( m_delete_action = GAction::create(