1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 10:24:59 +00:00

LibGUI: Add Undo/Redo to GCommonActions

This commit is contained in:
Andreas Kling 2019-09-14 22:23:49 +02:00
parent e83390387c
commit b41b5433f4
3 changed files with 18 additions and 12 deletions

View file

@ -35,18 +35,12 @@ GTextEditor::~GTextEditor()
void GTextEditor::create_actions()
{
m_undo_action = GAction::create(
"Undo", { Mod_Ctrl, Key_Z }, GraphicsBitmap::load_from_file("/res/icons/16x16/undo.png"), [&](const GAction&) {
// FIXME: Undo
},
this);
m_redo_action = GAction::create(
"Redo", { Mod_Ctrl, Key_Y }, GraphicsBitmap::load_from_file("/res/icons/16x16/redo.png"), [&](const GAction&) {
// FIXME: Redo
},
this);
m_undo_action = GCommonActions::make_undo_action([&](auto&) {
// FIXME: Undo
});
m_redo_action = GCommonActions::make_redo_action([&](auto&) {
// FIXME: Undo
});
m_cut_action = GCommonActions::make_cut_action([&](auto&) { cut(); }, this);
m_copy_action = GCommonActions::make_copy_action([&](auto&) { copy(); }, this);
m_paste_action = GCommonActions::make_paste_action([&](auto&) { paste(); }, this);