diff --git a/firmware/application/apps/ui_fileman.cpp b/firmware/application/apps/ui_fileman.cpp index 51b82e37..20688dbf 100644 --- a/firmware/application/apps/ui_fileman.cpp +++ b/firmware/application/apps/ui_fileman.cpp @@ -256,7 +256,6 @@ void FileManagerView::on_rename(NavigationView& nav) { if (destination_path.back() != '/') destination_path += '/'; destination_path = destination_path + buffer; - rename_file(get_selected_path(), destination_path); load_directory_contents(current_path); refresh_list(); @@ -297,7 +296,7 @@ void FileManagerView::on_delete() { void FileManagerView::refresh_widgets(const bool v) { button_rename.hidden(v); button_new_dir.hidden(v); - button_refactor.hidden(v); + button_refactor.hidden(v); button_delete.hidden(v); set_dirty(); } @@ -320,7 +319,7 @@ FileManagerView::FileManagerView( &labels, &text_date, &button_rename, - &button_refactor, + &button_refactor, &button_new_dir, &button_delete }); @@ -354,11 +353,11 @@ FileManagerView::FileManagerView( on_rename(nav); }; - button_refactor.on_select = [this, &nav](Button&) { - name_buffer = entry_list[menu_view.highlighted_index()].entry_path.filename().string().substr(0, max_filename_length); - on_refactor(nav); + button_refactor.on_select = [this, &nav](Button&) { + name_buffer = entry_list[menu_view.highlighted_index()].entry_path.filename().string().substr(0, max_filename_length); + on_refactor(nav); }; - + button_delete.on_select = [this, &nav](Button&) { // Use display_modal ? nav.push("Delete", "Delete " + entry_list[menu_view.highlighted_index()].entry_path.filename().string() + "\nAre you sure?", YESNO, diff --git a/firmware/application/apps/ui_fileman.hpp b/firmware/application/apps/ui_fileman.hpp index db2e06e2..ea2b90cc 100644 --- a/firmware/application/apps/ui_fileman.hpp +++ b/firmware/application/apps/ui_fileman.hpp @@ -146,7 +146,7 @@ private: void refresh_widgets(const bool v); void on_rename(NavigationView& nav); - void on_refactor(NavigationView& nav); + void on_refactor(NavigationView& nav); void on_delete(); Labels labels { @@ -163,10 +163,10 @@ private: "Rename" }; - Button button_refactor{ - { 10 * 8, 29 * 8, 10 * 8, 32 }, - "Refactor" - }; + Button button_refactor{ + { 10 * 8, 29 * 8, 10 * 8, 32 }, + "Refactor" + }; Button button_delete { { 20 * 8, 29 * 8, 10 * 8, 32 },