mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
remove some dead code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17320 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b2ad20c2cb
commit
ef5286c48c
2 changed files with 0 additions and 93 deletions
|
@ -554,54 +554,3 @@ bool option_screen(struct settings_list *setting,
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/* to be replaced */
|
||||
void option_select_init_items(struct option_select * opt,
|
||||
const char * title,
|
||||
int selected,
|
||||
const struct opt_items * items,
|
||||
int nb_items)
|
||||
{
|
||||
opt->title=title;
|
||||
opt->min_value=0;
|
||||
opt->max_value=nb_items;
|
||||
opt->option=selected;
|
||||
opt->items=items;
|
||||
}
|
||||
|
||||
void option_select_next(struct option_select * opt)
|
||||
{
|
||||
if(opt->option + 1 >= opt->max_value)
|
||||
{
|
||||
if(opt->option==opt->max_value-1)
|
||||
opt->option=opt->min_value;
|
||||
else
|
||||
opt->option=opt->max_value-1;
|
||||
}
|
||||
else
|
||||
opt->option+=1;
|
||||
}
|
||||
|
||||
void option_select_prev(struct option_select * opt)
|
||||
{
|
||||
if(opt->option - 1 < opt->min_value)
|
||||
{
|
||||
/* the dissimilarity to option_select_next() arises from the
|
||||
* sleep timer problem (bug #5000 and #5001):
|
||||
* there we have min=0, step = 5 but the value itself might
|
||||
* not be a multiple of 5 -- as time elapsed;
|
||||
* We need to be able to set timer to 0 (= Off) nevertheless. */
|
||||
if(opt->option!=opt->min_value)
|
||||
opt->option=opt->min_value;
|
||||
else
|
||||
opt->option=opt->max_value-1;
|
||||
}
|
||||
else
|
||||
opt->option-=1;
|
||||
}
|
||||
|
||||
const char * option_select_get_text(struct option_select * opt)
|
||||
{
|
||||
return(P2STR(opt->items[opt->option].string));
|
||||
}
|
||||
|
|
|
@ -27,48 +27,6 @@ bool option_screen(struct settings_list *setting,
|
|||
struct viewport parent[NB_SCREENS],
|
||||
bool use_temp_var, unsigned char* option_title);
|
||||
|
||||
struct option_select
|
||||
{
|
||||
const char * title;
|
||||
int min_value;
|
||||
int max_value;
|
||||
int option;
|
||||
const struct opt_items * items;
|
||||
};
|
||||
|
||||
/*
|
||||
* Initializes an option containing a list of choices
|
||||
* - title : the title of the option
|
||||
* - selected : the initially selected item
|
||||
* - items : the list of items, defined in settings.h
|
||||
* - nb_items : the number of items in the 'items' list
|
||||
*/
|
||||
extern void option_select_init_items(struct option_select * opt,
|
||||
const char * title,
|
||||
int selected,
|
||||
const struct opt_items * items,
|
||||
int nb_items);
|
||||
|
||||
/*
|
||||
* Gets the selected option
|
||||
* - opt : the option struct
|
||||
* Returns the selected option
|
||||
*/
|
||||
extern const char * option_select_get_text(struct option_select * opt);
|
||||
|
||||
/*
|
||||
* Selects the next value
|
||||
* - opt : the option struct
|
||||
*/
|
||||
extern void option_select_next(struct option_select * opt);
|
||||
|
||||
/*
|
||||
* Selects the previous value
|
||||
* - opt : the option struct
|
||||
*/
|
||||
extern void option_select_prev(struct option_select * opt);
|
||||
|
||||
|
||||
|
||||
void option_select_next_val(struct settings_list *setting,
|
||||
bool previous, bool apply);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue