[FL-2491] File browser GUI module (#1237)
* File browser module and test app * nfc: Add support for saved files in subdirectories * nfc: Use helper function to get shadow path when loading data * File browser dialog integration pt.1 * File browser dialog integration pt.2 * Gui,Dialogs: drop file select * Correct use of dynamic string_t(string_ptr) Co-authored-by: Yukai Li <yukaili.geek@gmail.com> Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "../ibutton_i.h"
|
||||
#include <toolbox/path.h>
|
||||
|
||||
void ibutton_scene_info_on_enter(void* context) {
|
||||
iButton* ibutton = context;
|
||||
@@ -7,7 +8,11 @@ void ibutton_scene_info_on_enter(void* context) {
|
||||
|
||||
const uint8_t* key_data = ibutton_key_get_data_p(key);
|
||||
|
||||
ibutton_text_store_set(ibutton, "%s", ibutton_key_get_name_p(key));
|
||||
string_t key_name;
|
||||
string_init(key_name);
|
||||
path_extract_filename(ibutton->file_path, key_name, true);
|
||||
|
||||
ibutton_text_store_set(ibutton, "%s", string_get_cstr(key_name));
|
||||
widget_add_text_box_element(
|
||||
widget, 0, 0, 128, 28, AlignCenter, AlignCenter, ibutton->text_store, false);
|
||||
|
||||
@@ -46,6 +51,8 @@ void ibutton_scene_info_on_enter(void* context) {
|
||||
widget, 64, 35, AlignCenter, AlignBottom, FontPrimary, ibutton->text_store);
|
||||
|
||||
view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewWidget);
|
||||
|
||||
string_clear(key_name);
|
||||
}
|
||||
|
||||
bool ibutton_scene_info_on_event(void* context, SceneManagerEvent event) {
|
||||
|
Reference in New Issue
Block a user