- Status Closed
- Percent Complete
- Task Type Patches
- Category
-
Assigned To
linusnielsen - Operating System
- Severity Low
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#1314 - Patch of radio menu
Modify :
- radio.c
- menu.c & menu.h
radio.c (patch from version 1.7) :
F1 : global menu for radio (nothing except a dummy entry)
F2 : list of presets, with contextual menu with F3
(modify or delete)
F3 : contextual menu for current radio :
- if preset exist : modify/delete
- if it doesn’t exist : add
menu.c, menu.h
Add :
- typedef int (*KeyHandler)(int, struct menu);
- int menu_default_key_handler(int key, struct menu);
- int menu_show_custom(int m, KeyHandler* handlers, int
handlers_count);
- bool menu_run_custom(int m, KeyHandler* handlers, int
handlers_count);
the KeyHandler is called each time a key is pressed, so
we can define custom keyhandler for menu.
The result can be :
- MENU_ACTION_NONE
- MENU_ACTION_EXIT
- MENU_ACTION_PARSE
- MENU_ACTION_SELECT
- MENU_ACTION_PREVIOUS
- MENU_ACTION_NEXT
- MENU_ACTION_F1
- MENU_ACTION_F2
- MENU_ACTION_F3
The default key handler is menu_default_key_handler.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
2 notes :
- There is a refresh bug on F2 contextual menu
- There is a warning in menu.c
I changed menu.h again :
int menu_default_key_handler(int key, struct menu*);
int menu_init(struct menu_items* items, int count);
int menu_init_with_keyhandler(struct menu_items* items, int
count, KeyHandler* handlers, int handlerscount);
void menu_exit(int menu);
int menu_show(int m);
So all is the same than the orignal menu.h except the
menu_init_with_keyhandler.
There still is a bug of refresh with F2 contextual menu.
On F2 :
ON+UP : move up the selected entry
ON+DOWN isn't implemented yet
(the menu isn't refresh but by pressing twice F2 you can see
the effect)
radio20030508.patch adds :
- ON+FOWARD / ON+PREVIOUS to go on next/previous preset
- Default radio is first preset
- PLAY : mute/unmute radio (update status bar, perhaps a
special icon is need for radio)
- still bug move up/move down/delete with F2 menu (if
someone could help me with menu_key_handler in radio.c)
Suppress all of bug (except ON+UP, ON+DOWN on F2 menu)
Add on F1:
- Set sensitivity
- Force mono
- Frequency range
Add on F3:
- Record (go on recording screen with settings set for radio)
A compiled version can download here :
http://a.flament.free.fr/rockbox/ajbrec-20030524.ajz
About radio-set.patch :
Add function radio_set which can set frequency, mute,
sensitivity, start IF measurement
About radio-format-fmr.patch :
Modify format of .fmr to store only used presets
I don't have an FM recorder. Assigning to Linus
Thanks Alexandre! I have committed my version of most of
your stuff except for the sensitivity. That'll come too.
Thanks to commit my work ;)
Is it possible to implement also on+down/on+up on presets
menu ? (and perhaps on+right/on+left ?)
I have a question about radio.c revision 1.38 : why
status_draw() is call only when update_screen is true ?
When I want to watch time but I didn't press any button for
a while, I see a wrong time.