summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/SOURCES2
-rw-r--r--apps/gui/buttonbar.h2
-rw-r--r--apps/gui/list.c8
-rw-r--r--apps/menu.c10
-rw-r--r--apps/recorder/keyboard.c8
-rw-r--r--apps/recorder/radio.c16
-rw-r--r--apps/screen_access.c4
-rw-r--r--apps/screen_access.h4
-rw-r--r--apps/tree.c6
-rw-r--r--firmware/export/config-fmrecorder.h2
-rw-r--r--firmware/export/config-recorder.h2
-rw-r--r--firmware/export/config-recorderv2.h2
12 files changed, 33 insertions, 33 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index c384982843..1da74e1b2a 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -47,7 +47,7 @@ filetree.c
scrobbler.c
screen_access.c
-#ifdef HAS_BUTTONBAR
+#ifdef HAVE_BUTTONBAR
gui/buttonbar.c
#endif
gui/gwps.c
diff --git a/apps/gui/buttonbar.h b/apps/gui/buttonbar.h
index 3098ecce4f..98eb83b184 100644
--- a/apps/gui/buttonbar.h
+++ b/apps/gui/buttonbar.h
@@ -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
diff --git a/apps/gui/list.c b/apps/gui/list.c
index ba25efdb44..a3df4a2f2c 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -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;
diff --git a/apps/menu.c b/apps/menu.c
index bbe3d697dd..64bb6e1847 100644
--- a/apps/menu.c
+++ b/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, "<<<", "", "");
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c
index 752e0369e9..9bbe529154 100644
--- a/apps/recorder/keyboard.c
+++ b/apps/recorder/keyboard.c
@@ -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
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index efc6aa0a74..ed6744ace8 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -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),
diff --git a/apps/screen_access.c b/apps/screen_access.c
index 82f80638af..acb376e92a 100644
--- a/apps/screen_access.c
+++ b/apps/screen_access.c
@@ -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
diff --git a/apps/screen_access.h b/apps/screen_access.h
index 883e1528dd..07684b0a76 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -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
diff --git a/apps/tree.c b/apps/tree.c
index 5771311847..6e023b7a8c 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -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),
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h
index dc45a86657..c3c894edb9 100644
--- a/firmware/export/config-fmrecorder.h
+++ b/firmware/export/config-fmrecorder.h
@@ -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
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h
index 9e26a221ac..bd9bd07d58 100644
--- a/firmware/export/config-recorder.h
+++ b/firmware/export/config-recorder.h
@@ -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
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h
index 4945d8f0ec..50066918b1 100644
--- a/firmware/export/config-recorderv2.h
+++ b/firmware/export/config-recorderv2.h
@@ -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