summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-09-23 03:23:36 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2024-11-02 17:27:22 -0400
commit06986d27f06528c8eb9f672a8f4913d3e3e7a307 (patch)
treeeba4e37fbc0685621702b7ab04ad69f6616253b0 /apps/tree.c
parent67ad6589fbcd65281364dba51aabefdc55990b2d (diff)
downloadrockbox-06986d27f06528c8eb9f672a8f4913d3e3e7a307.tar.gz
rockbox-06986d27f06528c8eb9f672a8f4913d3e3e7a307.zip
Generate A-Z menus in the tagtree
this adds a new command %byfirstletter %byfirstletter "custom_track" "Track A to Z" "title" ^ command ^menu name ^menu title ^subitem need a better name for subitem btw.. this patch also allows us to tell when we are in the BFL menu by checking customaction == ONPLAY_CUSTOMACTION_FIRSTLETTER we then enable spelling of the letters in the menu it spells Numeric too but that shouldn't matter with the upcoming voice patch Change-Id: I59815f697a4ef84a8cb540783b620d15f6670e00
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c
index ac82b6c2df..c422100de8 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -205,6 +205,7 @@ static int tree_voice_cb(int selected_item, void * data)
205 struct tree_context * local_tc=(struct tree_context *)data; 205 struct tree_context * local_tc=(struct tree_context *)data;
206 char *name; 206 char *name;
207 int attr=0; 207 int attr=0;
208 int customaction = ONPLAY_NO_CUSTOMACTION;
208#ifdef HAVE_TAGCACHE 209#ifdef HAVE_TAGCACHE
209 bool id3db = *(local_tc->dirfilter) == SHOW_ID3DB; 210 bool id3db = *(local_tc->dirfilter) == SHOW_ID3DB;
210 char buf[AVERAGE_FILENAME_LENGTH*2]; 211 char buf[AVERAGE_FILENAME_LENGTH*2];
@@ -213,6 +214,7 @@ static int tree_voice_cb(int selected_item, void * data)
213 { 214 {
214 attr = tagtree_get_attr(local_tc); 215 attr = tagtree_get_attr(local_tc);
215 name = tagtree_get_entry_name(local_tc, selected_item, buf, sizeof(buf)); 216 name = tagtree_get_entry_name(local_tc, selected_item, buf, sizeof(buf));
217 customaction = tagtree_get_custom_action(local_tc);
216 } 218 }
217 else 219 else
218#endif 220#endif
@@ -245,7 +247,7 @@ static int tree_voice_cb(int selected_item, void * data)
245 did_clip = false; 247 did_clip = false;
246 } 248 }
247 } 249 }
248 bool spell_name = false; 250 bool spell_name = (customaction == ONPLAY_CUSTOMACTION_FIRSTLETTER);
249 if(!did_clip) 251 if(!did_clip)
250 { 252 {
251 /* say the number or spell if required or as a fallback */ 253 /* say the number or spell if required or as a fallback */