| 160 | } |
| 161 | |
| 162 | void MdfViewer::OnUpdateOpenLogFile(wxUpdateUIEvent &event) { |
| 163 | if (notepad_.empty()) { |
| 164 | event.Enable(false); |
| 165 | return; |
| 166 | } |
| 167 | |
| 168 | auto& log_config = LogConfig::Instance(); |
| 169 | std::string logfile = log_config.GetLogFile(); |
| 170 | try { |
| 171 | std::filesystem::path p(logfile); |
| 172 | const bool exist = std::filesystem::exists(p); |
| 173 | event.Enable(exist); |
| 174 | } catch (const std::exception&) { |
| 175 | event.Enable(false); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | void MdfViewer::OnGnuPlotDownloadPage(wxCommandEvent& event) { |
| 180 | wxLaunchDefaultBrowser("http://www.gnuplot.info/", |
nothing calls this directly
no test coverage detected