Add 'Show Favorites First' visibility option (#17933)
This commit is contained in:
parent
766f895948
commit
4ba004a1e8
|
@ -795,6 +795,7 @@
|
|||
#define DEFAULT_CONTENT_SHOW_SETTINGS true
|
||||
#define DEFAULT_CONTENT_SHOW_HISTORY true
|
||||
#define DEFAULT_CONTENT_SHOW_FAVORITES true
|
||||
#define DEFAULT_CONTENT_SHOW_FAVORITES_FIRST false
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
#define DEFAULT_CONTENT_SHOW_IMAGES true
|
||||
#endif
|
||||
|
|
|
@ -2022,6 +2022,7 @@ static struct config_bool_setting *populate_settings_bool(
|
|||
|
||||
SETTING_BOOL("content_show_settings", &settings->bools.menu_content_show_settings, true, DEFAULT_CONTENT_SHOW_SETTINGS, false);
|
||||
SETTING_BOOL("content_show_favorites", &settings->bools.menu_content_show_favorites, true, DEFAULT_CONTENT_SHOW_FAVORITES, false);
|
||||
SETTING_BOOL("content_show_favorites_first", &settings->bools.menu_content_show_favorites_first, true, DEFAULT_CONTENT_SHOW_FAVORITES_FIRST, false);
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
SETTING_BOOL("content_show_images", &settings->bools.menu_content_show_images, true, DEFAULT_CONTENT_SHOW_IMAGES, false);
|
||||
#endif
|
||||
|
|
|
@ -820,6 +820,7 @@ typedef struct settings
|
|||
bool menu_xmb_vertical_thumbnails;
|
||||
bool menu_content_show_settings;
|
||||
bool menu_content_show_favorites;
|
||||
bool menu_content_show_favorites_first;
|
||||
bool menu_content_show_images;
|
||||
bool menu_content_show_music;
|
||||
bool menu_content_show_video;
|
||||
|
|
|
@ -4856,6 +4856,10 @@ MSG_HASH(
|
|||
MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES,
|
||||
"content_show_favorites"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES_FIRST,
|
||||
"content_show_favorites_first"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_CONTENT_SHOW_IMAGES,
|
||||
"content_show_images"
|
||||
|
|
|
@ -6456,6 +6456,14 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_CONTENT_SHOW_FAVORITES,
|
||||
"Show the 'Favorites' menu. (Restart required on Ozone/XMB)"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_FAVORITES_FIRST,
|
||||
"Show Favorites First"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CONTENT_SHOW_FAVORITES_FIRST,
|
||||
"Show 'Favorites' before 'History'. (Restart required on Ozone/XMB)"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_IMAGES,
|
||||
"Show 'Images'"
|
||||
|
|
|
@ -1164,6 +1164,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_enable_kiosk_mode,
|
|||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_disable_kiosk_mode, MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_kiosk_mode_password, MENU_ENUM_SUBLABEL_MENU_KIOSK_MODE_PASSWORD)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_favorites_tab, MENU_ENUM_SUBLABEL_CONTENT_SHOW_FAVORITES)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_favorites_first, MENU_ENUM_SUBLABEL_CONTENT_SHOW_FAVORITES_FIRST)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_images_tab, MENU_ENUM_SUBLABEL_CONTENT_SHOW_IMAGES)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_show_load_core, MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_show_load_content, MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT)
|
||||
|
@ -3055,6 +3056,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
|||
case MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_tab);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES_FIRST:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_favorites_first);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CONTENT_SHOW_IMAGES:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_images_tab);
|
||||
break;
|
||||
|
|
|
@ -8913,32 +8913,50 @@ static void *ozone_init(void **userdata, bool video_is_threaded)
|
|||
|
||||
ozone->system_tab_end = 0;
|
||||
ozone->tabs[ozone->system_tab_end] = OZONE_SYSTEM_TAB_MAIN;
|
||||
|
||||
if ( settings->bools.menu_content_show_settings
|
||||
&& !settings->bools.kiosk_mode_enable)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_SETTINGS;
|
||||
if (settings->bools.menu_content_show_history)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_HISTORY;
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_FAVORITES;
|
||||
|
||||
if (settings->bools.menu_content_show_favorites_first)
|
||||
{
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_FAVORITES;
|
||||
if (settings->bools.menu_content_show_history)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_HISTORY;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings->bools.menu_content_show_history)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_HISTORY;
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_FAVORITES;
|
||||
}
|
||||
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
if (settings->bools.menu_content_show_images)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_IMAGES;
|
||||
#endif
|
||||
|
||||
if (settings->bools.menu_content_show_music)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_MUSIC;
|
||||
|
||||
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
|
||||
if (settings->bools.menu_content_show_video)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_VIDEO;
|
||||
#endif
|
||||
|
||||
#if 0 /* Move Netplay and Import Content to Main Menu */
|
||||
#ifdef HAVE_NETWORKING
|
||||
if (settings->bools.menu_content_show_netplay)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_NETPLAY;
|
||||
#endif
|
||||
|
||||
if ( settings->bools.menu_content_show_add
|
||||
&& !settings->bools.kiosk_mode_enable)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_ADD;
|
||||
#endif /* 0 */
|
||||
|
||||
#if defined(HAVE_DYNAMIC)
|
||||
if (settings->uints.menu_content_show_contentless_cores !=
|
||||
MENU_CONTENTLESS_CORES_DISPLAY_NONE)
|
||||
|
|
|
@ -8657,29 +8657,46 @@ static void *xmb_init(void **userdata, bool video_is_threaded)
|
|||
if ( settings->bools.menu_content_show_settings
|
||||
&& !settings->bools.kiosk_mode_enable)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_SETTINGS;
|
||||
if (settings->bools.menu_content_show_history)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_HISTORY;
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_FAVORITES;
|
||||
|
||||
if (settings->bools.menu_content_show_favorites_first)
|
||||
{
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_FAVORITES;
|
||||
if (settings->bools.menu_content_show_history)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_HISTORY;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings->bools.menu_content_show_history)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_HISTORY;
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_FAVORITES;
|
||||
}
|
||||
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
if (settings->bools.menu_content_show_images)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_IMAGES;
|
||||
#endif
|
||||
|
||||
if (settings->bools.menu_content_show_music)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_MUSIC;
|
||||
|
||||
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
|
||||
if (settings->bools.menu_content_show_video)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_VIDEO;
|
||||
#endif
|
||||
|
||||
#if 0 /* Move Netplay and Import Content to Main Menu */
|
||||
#ifdef HAVE_NETWORKING
|
||||
if (settings->bools.menu_content_show_netplay)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_NETPLAY;
|
||||
#endif
|
||||
|
||||
if ( settings->bools.menu_content_show_add
|
||||
&& !settings->bools.kiosk_mode_enable)
|
||||
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_ADD;
|
||||
#endif /* 0 */
|
||||
|
||||
#if defined(HAVE_DYNAMIC)
|
||||
if ( settings->uints.menu_content_show_contentless_cores
|
||||
!= MENU_CONTENTLESS_CORES_DISPLAY_NONE)
|
||||
|
|
|
@ -4317,21 +4317,42 @@ static unsigned menu_displaylist_parse_playlists(
|
|||
|
||||
if (show_history)
|
||||
{
|
||||
if (settings->bools.menu_content_show_history)
|
||||
if (menu_entries_append(info_list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY),
|
||||
MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
if (settings->bools.menu_content_show_favorites_first)
|
||||
{
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
if (menu_entries_append(info_list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_FAVORITES),
|
||||
MENU_ENUM_LABEL_GOTO_FAVORITES,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
if (menu_entries_append(info_list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_FAVORITES),
|
||||
MENU_ENUM_LABEL_GOTO_FAVORITES,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
if (settings->bools.menu_content_show_history)
|
||||
if (menu_entries_append(info_list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY),
|
||||
MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings->bools.menu_content_show_history)
|
||||
if (menu_entries_append(info_list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY),
|
||||
MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
if (menu_entries_append(info_list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_FAVORITES),
|
||||
MENU_ENUM_LABEL_GOTO_FAVORITES,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (settings->bools.menu_content_show_images)
|
||||
|
@ -10088,6 +10109,7 @@ unsigned menu_displaylist_build_list(
|
|||
{MENU_ENUM_LABEL_CONTENT_SHOW_PLAYLIST_TABS, PARSE_ONLY_BOOL, true },
|
||||
{MENU_ENUM_LABEL_CONTENT_SHOW_HISTORY, PARSE_ONLY_BOOL, true },
|
||||
{MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES, PARSE_ONLY_BOOL, true },
|
||||
{MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES_FIRST, PARSE_ONLY_BOOL, true },
|
||||
{MENU_ENUM_LABEL_CONTENT_SHOW_IMAGES, PARSE_ONLY_BOOL, true },
|
||||
{MENU_ENUM_LABEL_CONTENT_SHOW_MUSIC, PARSE_ONLY_BOOL, true },
|
||||
{MENU_ENUM_LABEL_CONTENT_SHOW_VIDEO, PARSE_ONLY_BOOL, true },
|
||||
|
@ -15135,19 +15157,38 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||
|| (string_is_equal(menu_ident, "glui")
|
||||
&& !settings->bools.menu_materialui_show_nav_bar))
|
||||
{
|
||||
if (settings->bools.menu_content_show_history)
|
||||
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
|
||||
MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY,
|
||||
PARSE_ACTION, false) == 0)
|
||||
count++;
|
||||
if (settings->bools.menu_content_show_favorites_first)
|
||||
{
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
if (menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_FAVORITES),
|
||||
MENU_ENUM_LABEL_GOTO_FAVORITES,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
if (menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_FAVORITES),
|
||||
MENU_ENUM_LABEL_GOTO_FAVORITES,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
if (settings->bools.menu_content_show_history)
|
||||
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
|
||||
MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY,
|
||||
PARSE_ACTION, false) == 0)
|
||||
count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings->bools.menu_content_show_history)
|
||||
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
|
||||
MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY,
|
||||
PARSE_ACTION, false) == 0)
|
||||
count++;
|
||||
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
if (menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_FAVORITES),
|
||||
MENU_ENUM_LABEL_GOTO_FAVORITES,
|
||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_CDROM
|
||||
|
|
|
@ -19254,6 +19254,21 @@ static bool setting_append_list(
|
|||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.menu_content_show_favorites_first,
|
||||
MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES_FIRST,
|
||||
MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_FAVORITES_FIRST,
|
||||
DEFAULT_CONTENT_SHOW_FAVORITES_FIRST,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
|
|
|
@ -1598,6 +1598,7 @@ enum msg_hash_enums
|
|||
MENU_LABEL(CONTENT_SHOW_SETTINGS),
|
||||
MENU_LABEL(CONTENT_SHOW_SETTINGS_PASSWORD),
|
||||
MENU_LABEL(CONTENT_SHOW_FAVORITES),
|
||||
MENU_LABEL(CONTENT_SHOW_FAVORITES_FIRST),
|
||||
MENU_LABEL(CONTENT_SHOW_IMAGES),
|
||||
MENU_LABEL(CONTENT_SHOW_MUSIC),
|
||||
MENU_LABEL(CONTENT_SHOW_VIDEO),
|
||||
|
|
Loading…
Reference in New Issue