Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  User Interface and Voice
| | |-+  Button handler for the root menu
« previous next »
  • Print
Pages: [1]

Author Topic: Button handler for the root menu  (Read 3611 times)

Offline fed

  • Member
  • *
  • Posts: 54
Button handler for the root menu
« 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
« Last Edit: June 19, 2007, 02:55:08 AM by fed »
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Button handler for the root menu
« Reply #1 on: June 19, 2007, 03:52:02 AM »
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...
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline fed

  • Member
  • *
  • Posts: 54
Re: Button handler for the root menu
« Reply #2 on: June 19, 2007, 08:58:19 AM »
And where are these macros located?
Logged

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: Button handler for the root menu
« Reply #3 on: June 19, 2007, 09:12:36 AM »
do you know how to use "grep" ? :)
Logged

Read The Manual Please

Offline fed

  • Member
  • *
  • Posts: 54
Re: Button handler for the root menu
« Reply #4 on: June 19, 2007, 09:19:44 AM »
No, sorry.  What is that?
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Button handler for the root menu
« Reply #5 on: June 19, 2007, 09:26:57 AM »
in root_menu.c is the one you want...
what do you want to do?
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline fed

  • Member
  • *
  • Posts: 54
Re: Button handler for the root menu
« Reply #6 on: June 19, 2007, 09:52:57 AM »
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.
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Button handler for the root menu
« Reply #7 on: June 19, 2007, 09:54:46 AM »
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_)
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline fed

  • Member
  • *
  • Posts: 54
Re: Button handler for the root menu
« Reply #8 on: June 19, 2007, 10:03:58 AM »
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'?
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Button handler for the root menu
« Reply #9 on: June 19, 2007, 10:08:41 AM »
grep is the unix/linux program to search in files...

my previous post told you where to put your action case
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline fed

  • Member
  • *
  • Posts: 54
Re: Button handler for the root menu
« Reply #10 on: June 19, 2007, 10:20:14 AM »
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.
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Button handler for the root menu
« Reply #11 on: June 19, 2007, 10:22:34 AM »
bah, its not a siwtch, its alot of else if() lines starting line 437.
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline fed

  • Member
  • *
  • Posts: 54
Re: Button handler for the root menu
« Reply #12 on: June 19, 2007, 10:23:44 AM »
Got it!  Thanks.

I'll give it a try.
Logged

Offline fed

  • Member
  • *
  • Posts: 54
Re: Button handler for the root menu
« Reply #13 on: June 19, 2007, 11:28:45 AM »
Thanks a lot!

It works!
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  User Interface and Voice
| | |-+  Button handler for the root menu
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.075 seconds with 14 queries.