| 670 | } |
| 671 | |
| 672 | void Preferences::OnApply(wxCommandEvent &) { |
| 673 | for (auto const& change : pending_changes) |
| 674 | OPT_SET(change.first)->Set(change.second.get()); |
| 675 | pending_changes.clear(); |
| 676 | |
| 677 | for (auto const& thunk : pending_callbacks) |
| 678 | thunk(); |
| 679 | pending_callbacks.clear(); |
| 680 | |
| 681 | applyButton->Enable(false); |
| 682 | config::opt->Flush(); |
| 683 | } |
| 684 | |
| 685 | void Preferences::OnResetDefault(wxCommandEvent&) { |
| 686 | if (wxYES != wxMessageBox(_("Are you sure that you want to restore the defaults? All your settings will be overridden."), _("Restore defaults?"), wxYES_NO)) |