[FL-3001] File browser base folder (#2091)
* File browser base folder * Format sources * FuriHal: bump api version Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -14,6 +14,7 @@ void dialog_file_browser_set_basic_options(
|
||||
options->hide_ext = true;
|
||||
options->item_loader_callback = NULL;
|
||||
options->item_loader_context = NULL;
|
||||
options->base_path = NULL;
|
||||
}
|
||||
|
||||
static DialogsApp* dialogs_app_alloc() {
|
||||
|
@@ -18,6 +18,7 @@ typedef struct DialogsApp DialogsApp;
|
||||
/**
|
||||
* File browser dialog extra options
|
||||
* @param extension file extension to be offered for selection
|
||||
* @param base_path root folder path for navigation with back key
|
||||
* @param skip_assets true - do not show assets folders
|
||||
* @param hide_dot_files true - hide dot files
|
||||
* @param icon file icon pointer, NULL for default icon
|
||||
@@ -27,6 +28,7 @@ typedef struct DialogsApp DialogsApp;
|
||||
*/
|
||||
typedef struct {
|
||||
const char* extension;
|
||||
const char* base_path;
|
||||
bool skip_assets;
|
||||
bool hide_dot_files;
|
||||
const Icon* icon;
|
||||
|
@@ -24,6 +24,7 @@ bool dialog_file_browser_show(
|
||||
.preselected_filename = path,
|
||||
.item_callback = options ? options->item_loader_callback : NULL,
|
||||
.item_callback_context = options ? options->item_loader_context : NULL,
|
||||
.base_path = options ? options->base_path : NULL,
|
||||
}};
|
||||
|
||||
DialogsAppReturn return_data;
|
||||
|
@@ -17,6 +17,7 @@ typedef struct {
|
||||
FuriString* preselected_filename;
|
||||
FileBrowserLoadItemCallback item_callback;
|
||||
void* item_callback_context;
|
||||
const char* base_path;
|
||||
} DialogsAppMessageDataFileBrowser;
|
||||
|
||||
typedef struct {
|
||||
|
@@ -40,6 +40,7 @@ bool dialogs_app_process_module_file_browser(const DialogsAppMessageDataFileBrow
|
||||
file_browser_configure(
|
||||
file_browser,
|
||||
data->extension,
|
||||
data->base_path,
|
||||
data->skip_assets,
|
||||
data->hide_dot_files,
|
||||
data->file_icon,
|
||||
|
Reference in New Issue
Block a user