Accept FS #9052 by Alexander Levin with a fix by me. Changes HAS_BUTTONBAR into HAVE_BUTTONBAR to bring it in line with the other defines
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17655 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0792596e17
commit
f76122f0e7
|
@ -47,7 +47,7 @@ filetree.c
|
|||
scrobbler.c
|
||||
|
||||
screen_access.c
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
gui/buttonbar.c
|
||||
#endif
|
||||
gui/gwps.c
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "screen_access.h"
|
||||
|
||||
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
#define BUTTONBAR_HEIGHT 8
|
||||
#define BUTTONBAR_MAX_BUTTONS 3
|
||||
#define BUTTONBAR_CAPTION_LENGTH 8
|
||||
|
|
|
@ -79,7 +79,7 @@ void list_init_viewports(struct gui_synclist *list)
|
|||
list->parent[i]->height = screens[i].height - list->parent[i]->y;
|
||||
}
|
||||
}
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
if (list && (list->parent[0] == &parent[0]) && global_settings.buttonbar)
|
||||
list->parent[0]->height -= BUTTONBAR_HEIGHT;
|
||||
#endif
|
||||
|
@ -218,11 +218,11 @@ void gui_synclist_draw(struct gui_synclist *gui_list)
|
|||
int i;
|
||||
static struct gui_synclist *last_list = NULL;
|
||||
static int last_count = -1;
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
static bool last_buttonbar = false;
|
||||
#endif
|
||||
if (force_list_reinit ||
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
last_buttonbar != screens[SCREEN_MAIN].has_buttonbar ||
|
||||
#endif
|
||||
last_list != gui_list ||
|
||||
|
@ -231,7 +231,7 @@ void gui_synclist_draw(struct gui_synclist *gui_list)
|
|||
list_init_viewports(gui_list);
|
||||
force_list_reinit = false;
|
||||
}
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
last_buttonbar = screens[SCREEN_MAIN].has_buttonbar;
|
||||
#endif
|
||||
last_count = gui_list->nb_items;
|
||||
|
|
10
apps/menu.c
10
apps/menu.c
|
@ -299,7 +299,7 @@ static void init_default_menu_viewports(struct viewport parent[NB_SCREENS], bool
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
if (!hide_bars && global_settings.buttonbar)
|
||||
parent[0].height -= BUTTONBAR_HEIGHT;
|
||||
#endif
|
||||
|
@ -383,7 +383,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
bool in_stringlist, done = false;
|
||||
|
||||
struct viewport *vps, menu_vp[NB_SCREENS]; /* menu_vp will hopefully be phased out */
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
struct gui_buttonbar buttonbar;
|
||||
gui_buttonbar_init(&buttonbar);
|
||||
gui_buttonbar_set_display(&buttonbar, &(screens[SCREEN_MAIN]) );
|
||||
|
@ -418,7 +418,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
get_menu_callback(menu, &menu_callback);
|
||||
|
||||
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
if (!hide_bars)
|
||||
{
|
||||
gui_buttonbar_set(&buttonbar, "<<<", "", "");
|
||||
|
@ -526,7 +526,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
else if (action == ACTION_STD_OK)
|
||||
{
|
||||
int type;
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
if (!hide_bars)
|
||||
{
|
||||
gui_buttonbar_unset(&buttonbar);
|
||||
|
@ -633,7 +633,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
done = true;
|
||||
break;
|
||||
}
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
if (!hide_bars)
|
||||
{
|
||||
gui_buttonbar_set(&buttonbar, "<<<", "", "");
|
||||
|
|
|
@ -338,7 +338,7 @@ int kbd_input(char* text, int buflen)
|
|||
}
|
||||
|
||||
char outline[256];
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
struct gui_buttonbar buttonbar;
|
||||
bool buttonbar_config = global_settings.buttonbar;
|
||||
|
||||
|
@ -712,7 +712,7 @@ int kbd_input(char* text, int buflen)
|
|||
|
||||
cur_blink = !cur_blink;
|
||||
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
/* draw the button bar */
|
||||
gui_buttonbar_set(&buttonbar, "Shift", "OK", "Del");
|
||||
gui_buttonbar_draw(&buttonbar);
|
||||
|
@ -764,7 +764,7 @@ int kbd_input(char* text, int buflen)
|
|||
FOR_NB_SCREENS(l)
|
||||
screens[l].setfont(FONT_UI);
|
||||
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
global_settings.buttonbar=buttonbar_config;
|
||||
#endif
|
||||
return -1;
|
||||
|
@ -1230,7 +1230,7 @@ int kbd_input(char* text, int buflen)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
global_settings.buttonbar = buttonbar_config;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -452,7 +452,7 @@ int radio_screen(void)
|
|||
int button_timeout = current_tick + (2*HZ);
|
||||
#endif
|
||||
struct viewport vp[NB_SCREENS];
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
struct gui_buttonbar buttonbar;
|
||||
gui_buttonbar_init(&buttonbar);
|
||||
gui_buttonbar_set_display(&buttonbar, &(screens[SCREEN_MAIN]) );
|
||||
|
@ -468,7 +468,7 @@ int radio_screen(void)
|
|||
FOR_NB_SCREENS(i)
|
||||
{
|
||||
viewport_set_defaults(&vp[i], i);
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
if (global_settings.buttonbar)
|
||||
vp[i].height -= BUTTONBAR_HEIGHT;
|
||||
#endif
|
||||
|
@ -532,7 +532,7 @@ int radio_screen(void)
|
|||
if(curr_preset != -1)
|
||||
radio_mode = RADIO_PRESET_MODE;
|
||||
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU),
|
||||
str(LANG_PRESET), str(LANG_FM_BUTTONBAR_RECORD));
|
||||
#endif
|
||||
|
@ -728,7 +728,7 @@ int radio_screen(void)
|
|||
screens[i].update_viewport();
|
||||
screens[i].set_viewport(NULL);
|
||||
}
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU),
|
||||
str(LANG_PRESET),
|
||||
str(LANG_FM_BUTTONBAR_RECORD));
|
||||
|
@ -760,7 +760,7 @@ int radio_screen(void)
|
|||
screens[i].update_viewport();
|
||||
screens[i].set_viewport(NULL);
|
||||
}
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
gui_buttonbar_set(&buttonbar,
|
||||
str(LANG_BUTTONBAR_MENU),
|
||||
str(LANG_PRESET),
|
||||
|
@ -952,7 +952,7 @@ int radio_screen(void)
|
|||
screens[i].set_viewport(NULL);
|
||||
}
|
||||
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
gui_buttonbar_draw(&buttonbar);
|
||||
#endif
|
||||
}
|
||||
|
@ -1337,14 +1337,14 @@ static int handle_radio_presets(void)
|
|||
struct gui_synclist lists;
|
||||
int result = 0;
|
||||
int action = ACTION_NONE;
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
struct gui_buttonbar buttonbar;
|
||||
#endif
|
||||
|
||||
if(presets_loaded == false)
|
||||
return result;
|
||||
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
gui_buttonbar_init(&buttonbar);
|
||||
gui_buttonbar_set_display(&buttonbar, &(screens[SCREEN_MAIN]) );
|
||||
gui_buttonbar_set(&buttonbar, str(LANG_FM_BUTTONBAR_ADD),
|
||||
|
|
|
@ -128,7 +128,7 @@ struct screen screens[NB_SCREENS] =
|
|||
.backlight_off=&backlight_off,
|
||||
.is_backlight_on=&is_backlight_on,
|
||||
.backlight_set_timeout=&backlight_set_timeout,
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
.has_buttonbar=false
|
||||
#endif
|
||||
},
|
||||
|
@ -239,7 +239,7 @@ void screen_access_init(void)
|
|||
#ifdef HAVE_LCD_BITMAP
|
||||
if(global_settings.statusbar)
|
||||
height -= STATUSBAR_HEIGHT;
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
if(global_settings.buttonbar && display->has_buttonbar)
|
||||
height -= BUTTONBAR_HEIGHT;
|
||||
#endif
|
||||
|
|
|
@ -68,7 +68,7 @@ struct screen
|
|||
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
|
||||
bool has_disk_led;
|
||||
#endif
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
bool has_buttonbar;
|
||||
#endif
|
||||
void (*set_viewport)(struct viewport* vp);
|
||||
|
@ -155,7 +155,7 @@ struct screen
|
|||
void (*backlight_set_timeout)(int index);
|
||||
};
|
||||
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
/*
|
||||
* Sets if the given screen has a buttonbar or not
|
||||
* - screen : the screen structure
|
||||
|
|
|
@ -89,7 +89,7 @@ struct gui_synclist tree_lists;
|
|||
|
||||
/* I put it here because other files doesn't use it yet,
|
||||
* but should be elsewhere since it will be used mostly everywhere */
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
struct gui_buttonbar tree_buttonbar;
|
||||
#endif
|
||||
static struct tree_context tc;
|
||||
|
@ -299,7 +299,7 @@ void tree_gui_init(void)
|
|||
FOR_NB_SCREENS(i)
|
||||
screens[i].double_height(false);
|
||||
#endif
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
gui_buttonbar_init(&tree_buttonbar);
|
||||
/* since archos only have one screen, no need to create more than that */
|
||||
gui_buttonbar_set_display(&tree_buttonbar, &(screens[SCREEN_MAIN]) );
|
||||
|
@ -463,7 +463,7 @@ static int update_dir(void)
|
|||
tc.selected_item=tc.filesindir-1;
|
||||
|
||||
gui_synclist_select_item(&tree_lists, tc.selected_item);
|
||||
#ifdef HAS_BUTTONBAR
|
||||
#ifdef HAVE_BUTTONBAR
|
||||
if (global_settings.buttonbar) {
|
||||
if (*tc.dirfilter < NUM_FILTER_MODES)
|
||||
gui_buttonbar_set(&tree_buttonbar, str(LANG_SYSFONT_DIRBROWSE_F1),
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/* define this if you have access to the pitchscreen */
|
||||
#define HAVE_PITCHSCREEN
|
||||
/* define this if you have the button bar */
|
||||
#define HAS_BUTTONBAR
|
||||
#define HAVE_BUTTONBAR
|
||||
|
||||
/* define this if you would like tagcache to build on this target */
|
||||
#define HAVE_TAGCACHE
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/* define this if you have access to the pitchscreen */
|
||||
#define HAVE_PITCHSCREEN
|
||||
/* define this if you have the button bar */
|
||||
#define HAS_BUTTONBAR
|
||||
#define HAVE_BUTTONBAR
|
||||
|
||||
/* define this if you would like tagcache to build on this target */
|
||||
#define HAVE_TAGCACHE
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/* define this if you have access to the pitchscreen */
|
||||
#define HAVE_PITCHSCREEN
|
||||
/* define this if you have the button bar */
|
||||
#define HAS_BUTTONBAR
|
||||
#define HAVE_BUTTONBAR
|
||||
|
||||
/* define this if you would like tagcache to build on this target */
|
||||
#define HAVE_TAGCACHE
|
||||
|
|
Loading…
Reference in New Issue
Block a user