Rockbox Technical Forums
Support and General Use => User Interface and Voice => Topic started by: fed on June 19, 2007, 02:42:51 AM
-
Do you know where the button handler is for the root menu. Â I can't seem to find it in root_menu.c
-
first, please call the root menu the main menu, its named badly in the code...
now whats the problem?
the root_menu_ variable (its hidden in a MAKE_MENU() macro) is passed to do_menu() which does the actual button handling.
If you want techinal help the best place is on irc...
-
And where are these macros located?
-
do you know how to use "grep" ? :)
-
No, sorry. What is that?
-
in root_menu.c is the one you want...
what do you want to do?
-
I would like to add a new function to the rec button. I know how to change keymap. I've even succesfully changed a couple of buttons in the rec screen, and added the function to recording.c. Now, I'd like to add a button function to the main menu (the one that starts up when rockbox boots. The one with 'Files, Database, Setting, Recording, ...). But I cannot find the switch where I should be putting in the new function.
-
your being to vague too give proper help to...
menu.c in do_menu there is a switch for the action... add it there if (menu==&root_menu_)
-
In keymap, I assign an ACTION_SOMETHING to the rec button. Then in recording.c I placed 'case ACTION_SOMETHING' in a switch that then ran my function when the button is pushed. This worked.
I would like to do the same thing for the main menu, but I cannot find out where to place my function.
Does that help?
Also, what is 'grep'?
-
grep is the unix/linux program to search in files...
my previous post told you where to put your action case
-
I found no such location in menu.c in do_menu.
Sorry, but maybe I am missing something. I cannot find all the STD eactions there either.
-
bah, its not a siwtch, its alot of else if() lines starting line 437.
-
Got it! Thanks.
I'll give it a try.
-
Thanks a lot!
It works!