From 4a68eba1063265d7dc5b843e183fd6849c7ef68d Mon Sep 17 00:00:00 2001 From: EinTim23 Date: Mon, 25 Nov 2024 21:21:21 +0100 Subject: [PATCH] cleaned up the checkboxes --- src/main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 4844909..f8ce13c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -265,8 +265,8 @@ public: auto anyOtherCheckbox = new wxCheckBox(this, wxID_ANY, _("Any other"), wxDefaultPosition, wxDefaultSize, 0); anyOtherCheckbox->SetValue(settings.anyOtherEnabled); - anyOtherCheckbox->Bind(wxEVT_CHECKBOX, [&](wxCommandEvent& event) { - bool isChecked = anyOtherCheckbox->IsChecked(); + anyOtherCheckbox->Bind(wxEVT_CHECKBOX, [](wxCommandEvent& event) { + bool isChecked = event.IsChecked(); auto settings = utils::getSettings(); settings.anyOtherEnabled = isChecked; utils::saveSettings(settings); @@ -295,8 +295,8 @@ public: auto lastfmEnabledCheckbox = new wxCheckBox(this, wxID_ANY, _("Enabled"), wxDefaultPosition, wxDefaultSize, 0); lastfmEnabledCheckbox->SetValue(settings.lastfm.enabled); - lastfmEnabledCheckbox->Bind(wxEVT_CHECKBOX, [&](wxCommandEvent& event) { - bool isChecked = lastfmEnabledCheckbox->IsChecked(); + lastfmEnabledCheckbox->Bind(wxEVT_CHECKBOX, [](wxCommandEvent& event) { + bool isChecked = event.IsChecked(); auto settings = utils::getSettings(); settings.lastfm.enabled = isChecked; utils::saveSettings(settings); @@ -371,8 +371,8 @@ public: auto autostartCheckbox = new wxCheckBox(this, wxID_ANY, _("Launch at login"), wxDefaultPosition, wxDefaultSize, 0); autostartCheckbox->SetValue(settings.autoStart); - autostartCheckbox->Bind(wxEVT_CHECKBOX, [&](wxCommandEvent& event) { - bool isChecked = autostartCheckbox->IsChecked(); + autostartCheckbox->Bind(wxEVT_CHECKBOX, [](wxCommandEvent& event) { + bool isChecked = event.IsChecked(); auto settings = utils::getSettings(); settings.autoStart = isChecked; backend::toggleAutostart(isChecked);