Declare all folder names in a single source file (#2039)

This commit is contained in:
Mark Thompson
2024-03-25 02:44:49 -05:00
committed by GitHub
parent d9bbd1b9ff
commit d5c8525afc
56 changed files with 224 additions and 105 deletions

View File

@@ -28,6 +28,7 @@
#include "io_file.hpp"
#include "file.hpp"
#include "portapack_persistent_memory.hpp"
#include "file_path.hpp"
namespace ui::external_app::spainter {
@@ -39,15 +40,14 @@ SpectrumInputImageView::SpectrumInputImageView(NavigationView& nav) {
button_load_image.on_select = [this, &nav](Button&) {
auto open_view = nav.push<FileLoadView>(".bmp");
constexpr auto data_directory = u"SPECTRUM";
ensure_directory(data_directory);
open_view->push_dir(data_directory);
ensure_directory(spectrum_dir);
open_view->push_dir(spectrum_dir);
open_view->on_changed = [this](std::filesystem::path new_file_path) {
this->file = new_file_path.string();
painted = false;
this->set_dirty();
this->on_input_avaliable();
this->on_input_available();
};
};
}