[FL-1217] Menu refactoring (#726)

* menu: remove dead code
* loader: change views from modules instead of menu service
* dolphin: start main menu with loader API
* applications: don't start menu service
* loader: add debug tools menu
* gui modules: introduce menu model
* loader: remove calls to menu service API
* gui modules: implement menu module
* loader: add menu view
* gui menu: add animation
* applications: remove menu service
* gui modules: rename icon_menu -> menu
* loader: clean up code
* menu module: add documentation, format code
* menu: remove unused parameter
* desktop: use loader to launch primary menu
* Applications: cleaner makefile app declaration. Loader: application autostart
* Gui: cleanup menu and submenu API.

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
gornekich
2021-09-28 16:10:13 +03:00
committed by GitHub
parent 1c4e6ec74d
commit 61c8f3325a
20 changed files with 587 additions and 972 deletions

View File

@@ -1,6 +1,7 @@
#include "../desktop_i.h"
#include "../views/desktop_main.h"
#include "applications.h"
#include <loader/loader.h>
#define MAIN_VIEW_DEFAULT (0UL)
static void desktop_switch_to_app(Desktop* desktop, const FlipperApplication* flipper_app) {
@@ -48,8 +49,7 @@ const bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
if(event.type == SceneManagerEventTypeCustom) {
switch(event.event) {
case DesktopMainEventOpenMenu:
with_value_mutex(
desktop->menu_vm, (Menu * menu) { menu_ok(menu); });
loader_show_menu();
consumed = true;
break;