summaryrefslogtreecommitdiff
path: root/apps/gui/option_select.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-05-03 14:26:47 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-05-03 14:26:47 +0000
commitef5286c48cff068c182d690820639d5700b4bc9c (patch)
tree2140c476ce04dbd4b832ac7488d2e950b3f8b0c7 /apps/gui/option_select.c
parentb2ad20c2cb61a8c5848e5e42c249d5896818a44b (diff)
downloadrockbox-ef5286c48cff068c182d690820639d5700b4bc9c.tar.gz
rockbox-ef5286c48cff068c182d690820639d5700b4bc9c.zip
remove some dead code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17320 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/option_select.c')
-rw-r--r--apps/gui/option_select.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c
index 43b5fa6ea1..288bf9098b 100644
--- a/apps/gui/option_select.c
+++ b/apps/gui/option_select.c
@@ -554,54 +554,3 @@ bool option_screen(struct settings_list *setting,
554 554
555 return false; 555 return false;
556} 556}
557
558
559/* to be replaced */
560void option_select_init_items(struct option_select * opt,
561 const char * title,
562 int selected,
563 const struct opt_items * items,
564 int nb_items)
565{
566 opt->title=title;
567 opt->min_value=0;
568 opt->max_value=nb_items;
569 opt->option=selected;
570 opt->items=items;
571}
572
573void option_select_next(struct option_select * opt)
574{
575 if(opt->option + 1 >= opt->max_value)
576 {
577 if(opt->option==opt->max_value-1)
578 opt->option=opt->min_value;
579 else
580 opt->option=opt->max_value-1;
581 }
582 else
583 opt->option+=1;
584}
585
586void option_select_prev(struct option_select * opt)
587{
588 if(opt->option - 1 < opt->min_value)
589 {
590 /* the dissimilarity to option_select_next() arises from the
591 * sleep timer problem (bug #5000 and #5001):
592 * there we have min=0, step = 5 but the value itself might
593 * not be a multiple of 5 -- as time elapsed;
594 * We need to be able to set timer to 0 (= Off) nevertheless. */
595 if(opt->option!=opt->min_value)
596 opt->option=opt->min_value;
597 else
598 opt->option=opt->max_value-1;
599 }
600 else
601 opt->option-=1;
602}
603
604const char * option_select_get_text(struct option_select * opt)
605{
606 return(P2STR(opt->items[opt->option].string));
607}