M*LIB: non-inlined strings, FuriString primitive (#1795)

* Quicksave 1
* Header stage complete
* Source stage complete
* Lint & merge fixes
* Includes
* Documentation step 1
* FBT: output free size considering BT STACK
* Documentation step 2
* py lint
* Fix music player plugin
* unit test stage 1: string allocator, mem, getters, setters, appends, compare, search.
* unit test: string equality
* unit test: string replace
* unit test: string start_with, end_with
* unit test: string trim
* unit test: utf-8
* Rename
* Revert fw_size changes
* Simplify CLI backspace handling
* Simplify CLI character insert
* Merge fixes
* Furi: correct filenaming and spelling
* Bt: remove furi string include

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Sergey Gavrilov
2022-10-06 01:15:23 +10:00
committed by GitHub
parent 0f9ea925d3
commit 4bf29827f8
370 changed files with 5597 additions and 3963 deletions

View File

@@ -1,7 +1,6 @@
#include "assets_icons.h"
#include "file_browser_app_i.h"
#include "gui/modules/file_browser.h"
#include "m-string.h"
#include <furi.h>
#include <furi_hal.h>
#include <storage/storage.h>
@@ -47,7 +46,7 @@ FileBrowserApp* file_browser_app_alloc(char* arg) {
app->widget = widget_alloc();
string_init(app->file_path);
app->file_path = furi_string_alloc();
app->file_browser = file_browser_alloc(app->file_path);
file_browser_configure(app->file_browser, "*", true, &I_badusb_10px, true);
@@ -84,7 +83,7 @@ void file_browser_app_free(FileBrowserApp* app) {
furi_record_close(RECORD_NOTIFICATION);
furi_record_close(RECORD_DIALOGS);
string_clear(app->file_path);
furi_string_free(app->file_path);
free(app);
}

View File

@@ -22,7 +22,7 @@ struct FileBrowserApp {
Widget* widget;
FileBrowser* file_browser;
string_t file_path;
FuriString* file_path;
};
typedef enum {

View File

@@ -1,8 +1,5 @@
#include "../file_browser_app_i.h"
#include <core/check.h>
#include <core/log.h>
#include "furi_hal.h"
#include "m-string.h"
#include <furi.h>
#define DEFAULT_PATH "/"
#define EXTENSION "*"

View File

@@ -1,6 +1,5 @@
#include "../file_browser_app_i.h"
#include "furi_hal.h"
#include "m-string.h"
#include <furi.h>
void file_browser_scene_result_ok_callback(InputType type, void* context) {
furi_assert(context);
@@ -24,7 +23,13 @@ void file_browser_scene_result_on_enter(void* context) {
FileBrowserApp* app = context;
widget_add_string_multiline_element(
app->widget, 64, 10, AlignCenter, AlignTop, FontSecondary, string_get_cstr(app->file_path));
app->widget,
64,
10,
AlignCenter,
AlignTop,
FontSecondary,
furi_string_get_cstr(app->file_path));
view_dispatcher_switch_to_view(app->view_dispatcher, FileBrowserAppViewResult);
}

View File

@@ -19,7 +19,7 @@ bool file_browser_scene_start_on_event(void* context, SceneManagerEvent event) {
bool consumed = false;
if(event.type == SceneManagerEventTypeCustom) {
string_set_str(app->file_path, ANY_PATH("badusb/demo_windows.txt"));
furi_string_set(app->file_path, ANY_PATH("badusb/demo_windows.txt"));
scene_manager_next_scene(app->scene_manager, FileBrowserSceneBrowser);
consumed = true;
} else if(event.type == SceneManagerEventTypeTick) {