summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/onplay.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index 05046f6e00..3e52aab003 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -70,6 +70,7 @@ static const char *selected_file = NULL;
70static char selected_file_path[MAX_PATH]; 70static char selected_file_path[MAX_PATH];
71static int selected_file_attr = 0; 71static int selected_file_attr = 0;
72static int onplay_result = ONPLAY_OK; 72static int onplay_result = ONPLAY_OK;
73static bool in_queue_submenu = false;
73static bool (*ctx_current_playlist_insert)(int position, bool queue, bool create_new); 74static bool (*ctx_current_playlist_insert)(int position, bool queue, bool create_new);
74static int (*ctx_add_to_playlist)(const char* playlist, bool new_playlist); 75static int (*ctx_add_to_playlist)(const char* playlist, bool new_playlist);
75extern struct menu_item_ex file_menu; /* settings_menu.c */ 76extern struct menu_item_ex file_menu; /* settings_menu.c */
@@ -767,8 +768,6 @@ static int treeplaylist_callback(int action,
767 const struct menu_item_ex *this_item, 768 const struct menu_item_ex *this_item,
768 struct gui_synclist *this_list) 769 struct gui_synclist *this_list)
769{ 770{
770 static bool in_queue_submenu = false;
771
772 (void)this_list; 771 (void)this_list;
773 switch (action) 772 switch (action)
774 { 773 {
@@ -822,13 +821,7 @@ static int treeplaylist_callback(int action,
822 break; 821 break;
823 822
824 case ACTION_ENTER_MENUITEM: 823 case ACTION_ENTER_MENUITEM:
825 if (this_item == &queue_menu) 824 in_queue_submenu = this_item == &queue_menu;
826 in_queue_submenu = true;
827 break;
828
829 case ACTION_EXIT_MENUITEM:
830 if (this_item == &queue_menu)
831 in_queue_submenu = false;
832 break; 825 break;
833 } 826 }
834 827
@@ -844,6 +837,7 @@ void onplay_show_playlist_menu(const char* path, void (*playlist_insert_cb))
844 selected_file_attr = ATTR_DIRECTORY; 837 selected_file_attr = ATTR_DIRECTORY;
845 else 838 else
846 selected_file_attr = filetype_get_attr(path); 839 selected_file_attr = filetype_get_attr(path);
840 in_queue_submenu = false;
847 do_menu(&tree_playlist_menu, NULL, NULL, false); 841 do_menu(&tree_playlist_menu, NULL, NULL, false);
848} 842}
849 843