diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-14 22:23:49 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-14 22:23:49 +0200 |
commit | b41b5433f4c74301eee6e3a94c9c81af04283744 (patch) | |
tree | 8f2f5a2b573486bcf6eb58646c8a26a08d923ce9 /Libraries/LibGUI/GTextEditor.cpp | |
parent | e83390387c555d1778be08e921b49188ce845cd8 (diff) | |
download | serenity-b41b5433f4c74301eee6e3a94c9c81af04283744.zip |
LibGUI: Add Undo/Redo to GCommonActions
Diffstat (limited to 'Libraries/LibGUI/GTextEditor.cpp')
-rw-r--r-- | Libraries/LibGUI/GTextEditor.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Libraries/LibGUI/GTextEditor.cpp b/Libraries/LibGUI/GTextEditor.cpp index fe5b6b191a..73e97b9ff0 100644 --- a/Libraries/LibGUI/GTextEditor.cpp +++ b/Libraries/LibGUI/GTextEditor.cpp @@ -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); |