Fix xtreme app code naming consistency

This commit is contained in:
Willy-JL
2023-06-04 23:30:24 +01:00
parent b89f93e9a3
commit 90f06037bf
5 changed files with 30 additions and 18 deletions
@@ -4,6 +4,7 @@ enum VarItemListIndex {
VarItemListIndexSortDirsFirst,
VarItemListIndexDarkMode,
VarItemListIndexLeftHanded,
VarItemListIndexFavoriteTimeout,
};
void xtreme_app_scene_interface_common_var_item_list_callback(void* context, uint32_t index) {
@@ -27,7 +28,7 @@ static void xtreme_app_scene_interface_common_dark_mode_changed(VariableItem* it
app->save_settings = true;
}
static void xtreme_app_scene_interface_common_left_handed_changed(VariableItem* item) {
static void xtreme_app_scene_interface_common_hand_orient_changed(VariableItem* item) {
bool value = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
if(value) {
@@ -71,7 +72,7 @@ void xtreme_app_scene_interface_common_on_enter(void* context) {
var_item_list,
"Left Handed",
2,
xtreme_app_scene_interface_common_left_handed_changed,
xtreme_app_scene_interface_common_hand_orient_changed,
app);
bool value = furi_hal_rtc_is_flag_set(FuriHalRtcFlagHandOrient);
variable_item_set_current_value_index(item, value);
@@ -5,6 +5,7 @@ enum VarItemListIndex {
VarItemListIndexAnimSpeed,
VarItemListIndexCycleAnims,
VarItemListIndexUnlockAnims,
VarItemListIndexFallbackAnim,
};
void xtreme_app_scene_interface_graphics_var_item_list_callback(void* context, uint32_t index) {
@@ -1,8 +1,13 @@
#include "../xtreme_app.h"
enum VarItemListIndex {
VarItemListIndexShowClock,
VarItemListIndexLockOnBoot,
VarItemListIndexFormatOn10BadPins,
VarItemListIndexShowTime,
VarItemListIndexShowSeconds,
VarItemListIndexShowDate,
VarItemListIndexShowStatusbar,
VarItemListIndexUnlockPrompt,
};
void xtreme_app_scene_interface_lockscreen_var_item_list_callback(void* context, uint32_t index) {
@@ -26,7 +31,7 @@ static void xtreme_app_scene_interface_lockscreen_bad_pins_format_changed(Variab
app->save_settings = true;
}
static void xtreme_app_scene_interface_lockscreen_show_time_changed(VariableItem* item) {
static void xtreme_app_scene_interface_lockscreen_lockscreen_time_changed(VariableItem* item) {
XtremeApp* app = variable_item_get_context(item);
bool value = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
@@ -34,7 +39,7 @@ static void xtreme_app_scene_interface_lockscreen_show_time_changed(VariableItem
app->save_settings = true;
}
static void xtreme_app_scene_interface_lockscreen_show_seconds_changed(VariableItem* item) {
static void xtreme_app_scene_interface_lockscreen_lockscreen_seconds_changed(VariableItem* item) {
XtremeApp* app = variable_item_get_context(item);
bool value = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
@@ -42,7 +47,7 @@ static void xtreme_app_scene_interface_lockscreen_show_seconds_changed(VariableI
app->save_settings = true;
}
static void xtreme_app_scene_interface_lockscreen_show_date_changed(VariableItem* item) {
static void xtreme_app_scene_interface_lockscreen_lockscreen_date_changed(VariableItem* item) {
XtremeApp* app = variable_item_get_context(item);
bool value = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
@@ -50,7 +55,8 @@ static void xtreme_app_scene_interface_lockscreen_show_date_changed(VariableItem
app->save_settings = true;
}
static void xtreme_app_scene_interface_lockscreen_show_statusbar_changed(VariableItem* item) {
static void
xtreme_app_scene_interface_lockscreen_lockscreen_statusbar_changed(VariableItem* item) {
XtremeApp* app = variable_item_get_context(item);
bool value = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
@@ -58,7 +64,7 @@ static void xtreme_app_scene_interface_lockscreen_show_statusbar_changed(Variabl
app->save_settings = true;
}
static void xtreme_app_scene_interface_lockscreen_unlock_prompt_changed(VariableItem* item) {
static void xtreme_app_scene_interface_lockscreen_lockscreen_prompt_changed(VariableItem* item) {
XtremeApp* app = variable_item_get_context(item);
bool value = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
@@ -94,7 +100,7 @@ void xtreme_app_scene_interface_lockscreen_on_enter(void* context) {
var_item_list,
"Show Time",
2,
xtreme_app_scene_interface_lockscreen_show_time_changed,
xtreme_app_scene_interface_lockscreen_lockscreen_time_changed,
app);
variable_item_set_current_value_index(item, xtreme_settings->lockscreen_time);
variable_item_set_current_value_text(item, xtreme_settings->lockscreen_time ? "ON" : "OFF");
@@ -103,7 +109,7 @@ void xtreme_app_scene_interface_lockscreen_on_enter(void* context) {
var_item_list,
"Show Seconds",
2,
xtreme_app_scene_interface_lockscreen_show_seconds_changed,
xtreme_app_scene_interface_lockscreen_lockscreen_seconds_changed,
app);
variable_item_set_current_value_index(item, xtreme_settings->lockscreen_seconds);
variable_item_set_current_value_text(item, xtreme_settings->lockscreen_seconds ? "ON" : "OFF");
@@ -112,7 +118,7 @@ void xtreme_app_scene_interface_lockscreen_on_enter(void* context) {
var_item_list,
"Show Date",
2,
xtreme_app_scene_interface_lockscreen_show_date_changed,
xtreme_app_scene_interface_lockscreen_lockscreen_date_changed,
app);
variable_item_set_current_value_index(item, xtreme_settings->lockscreen_date);
variable_item_set_current_value_text(item, xtreme_settings->lockscreen_date ? "ON" : "OFF");
@@ -121,7 +127,7 @@ void xtreme_app_scene_interface_lockscreen_on_enter(void* context) {
var_item_list,
"Show Statusbar",
2,
xtreme_app_scene_interface_lockscreen_show_statusbar_changed,
xtreme_app_scene_interface_lockscreen_lockscreen_statusbar_changed,
app);
variable_item_set_current_value_index(item, xtreme_settings->lockscreen_statusbar);
variable_item_set_current_value_text(
@@ -131,7 +137,7 @@ void xtreme_app_scene_interface_lockscreen_on_enter(void* context) {
var_item_list,
"Unlock Prompt",
2,
xtreme_app_scene_interface_lockscreen_unlock_prompt_changed,
xtreme_app_scene_interface_lockscreen_lockscreen_prompt_changed,
app);
variable_item_set_current_value_index(item, xtreme_settings->lockscreen_prompt);
variable_item_set_current_value_text(item, xtreme_settings->lockscreen_prompt ? "ON" : "OFF");
@@ -1,7 +1,7 @@
#include "../xtreme_app.h"
enum VarItemListIndex {
VarItemListIndexWiiMenu,
VarItemListIndexMenuStyle,
VarItemListIndexApp,
VarItemListIndexRemoveApp,
VarItemListIndexAddApp,
@@ -12,7 +12,7 @@ void xtreme_app_scene_protocols_var_item_list_callback(void* context, uint32_t i
view_dispatcher_send_custom_event(app->view_dispatcher, index);
}
static void xtreme_app_scene_protocols_badkb_mode_changed(VariableItem* item) {
static void xtreme_app_scene_protocols_bad_bt_changed(VariableItem* item) {
XtremeApp* app = variable_item_get_context(item);
bool value = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, value ? "BT" : "USB");
@@ -20,7 +20,7 @@ static void xtreme_app_scene_protocols_badkb_mode_changed(VariableItem* item) {
app->save_settings = true;
}
static void xtreme_app_scene_protocols_badbt_remember_changed(VariableItem* item) {
static void xtreme_app_scene_protocols_bad_bt_remember_changed(VariableItem* item) {
XtremeApp* app = variable_item_get_context(item);
bool value = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
@@ -42,12 +42,16 @@ void xtreme_app_scene_protocols_on_enter(void* context) {
VariableItem* item;
item = variable_item_list_add(
var_item_list, "BadKB Mode", 2, xtreme_app_scene_protocols_badkb_mode_changed, app);
var_item_list, "BadKB Mode", 2, xtreme_app_scene_protocols_bad_bt_changed, app);
variable_item_set_current_value_index(item, xtreme_settings->bad_bt);
variable_item_set_current_value_text(item, xtreme_settings->bad_bt ? "BT" : "USB");
item = variable_item_list_add(
var_item_list, "BadBT Remember", 2, xtreme_app_scene_protocols_badbt_remember_changed, app);
var_item_list,
"BadBT Remember",
2,
xtreme_app_scene_protocols_bad_bt_remember_changed,
app);
variable_item_set_current_value_index(item, xtreme_settings->bad_bt_remember);
variable_item_set_current_value_text(item, xtreme_settings->bad_bt_remember ? "ON" : "OFF");