Removed button bar for devices with no F buttons (Ondio)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5237 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2004-10-09 20:54:15 +00:00
parent a1a08d0d5f
commit 1f0908dfaf
5 changed files with 17 additions and 3 deletions

View file

@ -145,12 +145,14 @@ void menu_draw(int m)
if (global_settings.statusbar)
height -= STATUSBAR_HEIGHT;
#if CONFIG_KEYPAD == RECORDER_PAD
if(global_settings.buttonbar && menus[m].use_buttonbar) {
buttonbar_set(menus[m].buttonbar[0],
menus[m].buttonbar[1],
menus[m].buttonbar[2]);
height -= BUTTONBAR_HEIGHT;
}
#endif
menu_lines = height / fh;
@ -196,9 +198,11 @@ void menu_draw(int m)
height, menus[m].itemcount, menus[m].top,
menus[m].top + menu_lines, VERTICAL);
#if CONFIG_KEYPAD == RECORDER_PAD
if(global_settings.buttonbar && menus[m].use_buttonbar)
buttonbar_draw();
#endif
#endif /* CONFIG_KEYPAD == RECORDER_PAD */
#endif /* HAVE_LCD_BITMAP */
status_draw(true);
lcd_update();
@ -280,12 +284,14 @@ int menu_show(int m)
if (global_settings.statusbar)
height -= STATUSBAR_HEIGHT;
#if CONFIG_KEYPAD == RECORDER_PAD
if(global_settings.buttonbar && menus[m].use_buttonbar) {
buttonbar_set(menus[m].buttonbar[0],
menus[m].buttonbar[1],
menus[m].buttonbar[2]);
height -= BUTTONBAR_HEIGHT;
}
#endif
menu_lines = height / fh;
#else

View file

@ -195,7 +195,9 @@ static const struct bit_entry rtc_bits[] =
{1, S_O(invert_cursor), false, "invert cursor", off_on },
{1, S_O(statusbar), true, "statusbar", off_on },
{1, S_O(scrollbar), true, "scrollbar", off_on },
#if CONFIG_KEYPAD == RECORDER_PAD
{1, S_O(buttonbar), true, "buttonbar", off_on },
#endif
{1, S_O(volume_type), 0, "volume display", graphic_numeric },
{1, S_O(battery_type), 0, "battery display", graphic_numeric },
{1, S_O(timeformat), 0, "time format", "24hour,12hour" },

View file

@ -957,11 +957,13 @@ static bool status_bar(void)
return set_bool( str(LANG_STATUS_BAR), &global_settings.statusbar );
}
#if CONFIG_KEYPAD == RECORDER_PAD
static bool button_bar(void)
{
return set_bool( str(LANG_BUTTON_BAR), &global_settings.buttonbar );
}
#endif
#endif /* CONFIG_KEYPAD == RECORDER_PAD */
#endif /* HAVE_LCD_BITMAP */
static bool ff_rewind_settings_menu(void)
{
@ -1175,7 +1177,9 @@ static bool bars_settings_menu(void)
static const struct menu_item items[] = {
{ ID2P(LANG_SCROLL_BAR), scroll_bar },
{ ID2P(LANG_STATUS_BAR), status_bar },
#if CONFIG_KEYPAD == RECORDER_PAD
{ ID2P(LANG_BUTTON_BAR), button_bar },
#endif
{ ID2P(LANG_VOLUME_DISPLAY), volume_type },
{ ID2P(LANG_BATTERY_DISPLAY), battery_type },
};

View file

@ -267,7 +267,7 @@ void status_draw(bool force_redraw)
}
#ifdef HAVE_LCD_BITMAP
#if defined(HAVE_LCD_BITMAP) && (CONFIG_KEYPAD == RECORDER_PAD)
static void draw_buttonbar_btn(int num, const char* caption)
{
int xpos, ypos, button_width, text_width;

View file

@ -636,6 +636,7 @@ static int showdir(const char *path, int start, const int *dirfilter)
tree_max_on_screen * line_height, filesindir, start,
start + tree_max_on_screen, VERTICAL);
#if CONFIG_KEYPAD == RECORDER_PAD
if(global_settings.buttonbar) {
buttonbar_set(*dirfilter < NUM_FILTER_MODES ?
str(LANG_DIRBROWSE_F1) : (unsigned char *) "",
@ -643,6 +644,7 @@ static int showdir(const char *path, int start, const int *dirfilter)
str(LANG_DIRBROWSE_F3));
buttonbar_draw();
}
#endif
#endif
status_draw(true);