summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GTextEditor.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-14 22:23:49 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-14 22:23:49 +0200
commitb41b5433f4c74301eee6e3a94c9c81af04283744 (patch)
tree8f2f5a2b573486bcf6eb58646c8a26a08d923ce9 /Libraries/LibGUI/GTextEditor.cpp
parente83390387c555d1778be08e921b49188ce845cd8 (diff)
downloadserenity-b41b5433f4c74301eee6e3a94c9c81af04283744.zip
LibGUI: Add Undo/Redo to GCommonActions
Diffstat (limited to 'Libraries/LibGUI/GTextEditor.cpp')
-rw-r--r--Libraries/LibGUI/GTextEditor.cpp18
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);