summaryrefslogtreecommitdiff
path: root/Applications/TextEditor
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-25 21:42:37 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-25 21:46:39 +0200
commite8e8741c886506beb31ec2e10ab04bcedbcbdb4d (patch)
treedacd7a8950f2977fd8d8c62a411061c53732500b /Applications/TextEditor
parentded005500d87d82d0773e3682e47f190dfa98900 (diff)
downloadserenity-e8e8741c886506beb31ec2e10ab04bcedbcbdb4d.zip
LibGUI+TextEditor: Make GButton activate its action if present
Previously even if you assigned a GAction to a GButton, you still had to activate() the action manually by hooking the GButton::on_click callback.
Diffstat (limited to 'Applications/TextEditor')
-rw-r--r--Applications/TextEditor/TextEditorWidget.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/Applications/TextEditor/TextEditorWidget.cpp b/Applications/TextEditor/TextEditorWidget.cpp
index 5d8a1f11a8..fefc9e5dcd 100644
--- a/Applications/TextEditor/TextEditorWidget.cpp
+++ b/Applications/TextEditor/TextEditorWidget.cpp
@@ -74,17 +74,11 @@ TextEditorWidget::TextEditorWidget()
m_find_previous_button->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
m_find_previous_button->set_preferred_size(64, 0);
m_find_previous_button->set_action(*m_find_previous_action);
- m_find_previous_button->on_click = [&](auto&) {
- m_find_previous_action->activate();
- };
m_find_next_button = new GButton("Next", m_find_widget);
m_find_next_button->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill);
m_find_next_button->set_preferred_size(64, 0);
m_find_next_button->set_action(*m_find_next_action);
- m_find_next_button->on_click = [&](auto&) {
- m_find_next_action->activate();
- };
m_find_textbox->on_return_pressed = [this] {
m_find_next_button->click();