summaryrefslogtreecommitdiff
path: root/Applications/FileManager
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-03-03 17:02:38 +0100
committerAndreas Kling <kling@serenityos.org>2020-03-03 17:02:38 +0100
commita26b63a9585631d39c97db5b5808aca351894da8 (patch)
tree28f4f48f4f7c8487fb2326e23d6b070ee6e785e6 /Applications/FileManager
parentb1d35248e45a6c4e4e9b9a55aa5d8fa60e60c276 (diff)
downloadserenity-a26b63a9585631d39c97db5b5808aca351894da8.zip
LibGUI: Remove Button& parameter from Button::on_click hook
There was but a single user of this parameter and it's a bit tedious to write it out every time, so let's get rid of it.
Diffstat (limited to 'Applications/FileManager')
-rw-r--r--Applications/FileManager/PropertiesDialog.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/Applications/FileManager/PropertiesDialog.cpp b/Applications/FileManager/PropertiesDialog.cpp
index c8fb51aca9..4c43f069ca 100644
--- a/Applications/FileManager/PropertiesDialog.cpp
+++ b/Applications/FileManager/PropertiesDialog.cpp
@@ -139,11 +139,16 @@ PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, boo
button_widget->layout()->add_spacer();
- make_button("OK", button_widget)->on_click = [&](auto&) {if(apply_changes()) close(); };
- make_button("Cancel", button_widget)->on_click = [&](auto&) { close(); };
+ make_button("OK", button_widget)->on_click = [this] {
+ if (apply_changes())
+ close();
+ };
+ make_button("Cancel", button_widget)->on_click = [this] {
+ close();
+ };
m_apply_button = make_button("Apply", button_widget);
- m_apply_button->on_click = [&](auto&) { apply_changes(); };
+ m_apply_button->on_click = [this] { apply_changes(); };
m_apply_button->set_enabled(false);
update();