[FL-3797] Favorite apps navigation fix and text fixes (#3670)

* fixed navigation in dummy mode, fixed wording for button presses and menus
* suppress PVS warnings

Co-authored-by: doomwastaken <k.volkov@flipperdevices.com>
This commit is contained in:
Konstantin Volkov 2024-05-28 14:57:03 +03:00 committed by GitHub
parent a6139b01ce
commit f309844ee0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 18 deletions

View File

@ -80,6 +80,7 @@ void desktop_settings_scene_favorite_on_enter(void* context) {
furi_assert(favorite_id < DummyAppNumber);
curr_favorite_app = &app->settings.dummy_apps[favorite_id];
default_passport = true;
favorite_id |= SCENE_STATE_SET_DUMMY_APP;
}
// Special case: Application browser
@ -141,28 +142,24 @@ void desktop_settings_scene_favorite_on_enter(void* context) {
switch(favorite_id) {
case SCENE_STATE_SET_FAVORITE_APP | FavoriteAppLeftShort:
submenu_set_header(submenu, "Left - Short");
case SCENE_STATE_SET_DUMMY_APP | DummyAppLeft:
submenu_set_header(submenu, "Left - Press");
break;
case SCENE_STATE_SET_FAVORITE_APP | FavoriteAppLeftLong:
submenu_set_header(submenu, "Left - Long");
submenu_set_header(submenu, "Left - Hold");
break;
case SCENE_STATE_SET_FAVORITE_APP | FavoriteAppRightShort:
submenu_set_header(submenu, "Right - Short");
case SCENE_STATE_SET_DUMMY_APP | DummyAppRight:
submenu_set_header(submenu, "Right - Press");
break;
case SCENE_STATE_SET_FAVORITE_APP | FavoriteAppRightLong:
submenu_set_header(submenu, "Right - Long");
break;
case SCENE_STATE_SET_DUMMY_APP | DummyAppLeft:
submenu_set_header(submenu, "Left");
break;
case SCENE_STATE_SET_DUMMY_APP | DummyAppRight:
submenu_set_header(submenu, "Right");
submenu_set_header(submenu, "Right - Hold");
break;
case SCENE_STATE_SET_DUMMY_APP | DummyAppDown:
submenu_set_header(submenu, "Down");
submenu_set_header(submenu, "Down - Press");
break;
case SCENE_STATE_SET_DUMMY_APP | DummyAppOk:
submenu_set_header(submenu, "Middle");
submenu_set_header(submenu, "Middle - Press");
break;
default:
break;

View File

@ -34,14 +34,14 @@ void desktop_settings_scene_quick_apps_direction_menu_on_enter(void* context) {
if(favorite_id == SCENE_STATE_SET_FAVORITE_APP) {
submenu_add_item(
submenu,
"Left - Click",
"Left - Press",
QuickAppsSubmenuIndexFavoriteLeftClick,
desktop_settings_scene_quick_apps_direction_menu_submenu_callback,
app);
submenu_add_item(
submenu,
"Right - Click",
"Right - Press",
QuickAppsSubmenuIndexFavoriteRightClick,
desktop_settings_scene_quick_apps_direction_menu_submenu_callback,
app);
@ -64,28 +64,28 @@ void desktop_settings_scene_quick_apps_direction_menu_on_enter(void* context) {
} else {
submenu_add_item(
submenu,
"Left - Click",
"Left - Press",
QuickAppsSubmenuIndexDummyLeftClick,
desktop_settings_scene_quick_apps_direction_menu_submenu_callback,
app);
submenu_add_item(
submenu,
"Right - Click",
"Right - Press",
QuickAppsSubmenuIndexDummyRightClick,
desktop_settings_scene_quick_apps_direction_menu_submenu_callback,
app);
submenu_add_item(
submenu,
"Down - Click",
"Down - Press",
QuickAppsSubmenuIndexDummyDownClick,
desktop_settings_scene_quick_apps_direction_menu_submenu_callback,
app);
submenu_add_item(
submenu,
"Middle - Click",
"Middle - Press",
QuickAppsSubmenuIndexDummyMiddleClick,
desktop_settings_scene_quick_apps_direction_menu_submenu_callback,
app);