summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2008-05-29 20:32:39 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2008-05-29 20:32:39 +0000
commitf76122f0e7a3b82962dbe005d58a643c835013d0 (patch)
tree5c4e17d6bf78d70c5612191f9c2f70a561e35b77
parent0792596e1757a5ad91c3959d3721d812c8a282eb (diff)
downloadrockbox-f76122f0e7a3b82962dbe005d58a643c835013d0.tar.gz
rockbox-f76122f0e7a3b82962dbe005d58a643c835013d0.zip
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
-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
47scrobbler.c 47scrobbler.c
48 48
49screen_access.c 49screen_access.c
50#ifdef HAS_BUTTONBAR 50#ifdef HAVE_BUTTONBAR
51gui/buttonbar.c 51gui/buttonbar.c
52#endif 52#endif
53gui/gwps.c 53gui/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 @@
24#include "screen_access.h" 24#include "screen_access.h"
25 25
26 26
27#ifdef HAS_BUTTONBAR 27#ifdef HAVE_BUTTONBAR
28#define BUTTONBAR_HEIGHT 8 28#define BUTTONBAR_HEIGHT 8
29#define BUTTONBAR_MAX_BUTTONS 3 29#define BUTTONBAR_MAX_BUTTONS 3
30#define BUTTONBAR_CAPTION_LENGTH 8 30#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)
79 list->parent[i]->height = screens[i].height - list->parent[i]->y; 79 list->parent[i]->height = screens[i].height - list->parent[i]->y;
80 } 80 }
81 } 81 }
82#ifdef HAS_BUTTONBAR 82#ifdef HAVE_BUTTONBAR
83 if (list && (list->parent[0] == &parent[0]) && global_settings.buttonbar) 83 if (list && (list->parent[0] == &parent[0]) && global_settings.buttonbar)
84 list->parent[0]->height -= BUTTONBAR_HEIGHT; 84 list->parent[0]->height -= BUTTONBAR_HEIGHT;
85#endif 85#endif
@@ -218,11 +218,11 @@ void gui_synclist_draw(struct gui_synclist *gui_list)
218 int i; 218 int i;
219 static struct gui_synclist *last_list = NULL; 219 static struct gui_synclist *last_list = NULL;
220 static int last_count = -1; 220 static int last_count = -1;
221#ifdef HAS_BUTTONBAR 221#ifdef HAVE_BUTTONBAR
222 static bool last_buttonbar = false; 222 static bool last_buttonbar = false;
223#endif 223#endif
224 if (force_list_reinit || 224 if (force_list_reinit ||
225#ifdef HAS_BUTTONBAR 225#ifdef HAVE_BUTTONBAR
226 last_buttonbar != screens[SCREEN_MAIN].has_buttonbar || 226 last_buttonbar != screens[SCREEN_MAIN].has_buttonbar ||
227#endif 227#endif
228 last_list != gui_list || 228 last_list != gui_list ||
@@ -231,7 +231,7 @@ void gui_synclist_draw(struct gui_synclist *gui_list)
231 list_init_viewports(gui_list); 231 list_init_viewports(gui_list);
232 force_list_reinit = false; 232 force_list_reinit = false;
233 } 233 }
234#ifdef HAS_BUTTONBAR 234#ifdef HAVE_BUTTONBAR
235 last_buttonbar = screens[SCREEN_MAIN].has_buttonbar; 235 last_buttonbar = screens[SCREEN_MAIN].has_buttonbar;
236#endif 236#endif
237 last_count = gui_list->nb_items; 237 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
299 } 299 }
300 } 300 }
301 } 301 }
302#ifdef HAS_BUTTONBAR 302#ifdef HAVE_BUTTONBAR
303 if (!hide_bars && global_settings.buttonbar) 303 if (!hide_bars && global_settings.buttonbar)
304 parent[0].height -= BUTTONBAR_HEIGHT; 304 parent[0].height -= BUTTONBAR_HEIGHT;
305#endif 305#endif
@@ -383,7 +383,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
383 bool in_stringlist, done = false; 383 bool in_stringlist, done = false;
384 384
385 struct viewport *vps, menu_vp[NB_SCREENS]; /* menu_vp will hopefully be phased out */ 385 struct viewport *vps, menu_vp[NB_SCREENS]; /* menu_vp will hopefully be phased out */
386#ifdef HAS_BUTTONBAR 386#ifdef HAVE_BUTTONBAR
387 struct gui_buttonbar buttonbar; 387 struct gui_buttonbar buttonbar;
388 gui_buttonbar_init(&buttonbar); 388 gui_buttonbar_init(&buttonbar);
389 gui_buttonbar_set_display(&buttonbar, &(screens[SCREEN_MAIN]) ); 389 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,
418 get_menu_callback(menu, &menu_callback); 418 get_menu_callback(menu, &menu_callback);
419 419
420 420
421#ifdef HAS_BUTTONBAR 421#ifdef HAVE_BUTTONBAR
422 if (!hide_bars) 422 if (!hide_bars)
423 { 423 {
424 gui_buttonbar_set(&buttonbar, "<<<", "", ""); 424 gui_buttonbar_set(&buttonbar, "<<<", "", "");
@@ -526,7 +526,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
526 else if (action == ACTION_STD_OK) 526 else if (action == ACTION_STD_OK)
527 { 527 {
528 int type; 528 int type;
529#ifdef HAS_BUTTONBAR 529#ifdef HAVE_BUTTONBAR
530 if (!hide_bars) 530 if (!hide_bars)
531 { 531 {
532 gui_buttonbar_unset(&buttonbar); 532 gui_buttonbar_unset(&buttonbar);
@@ -633,7 +633,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
633 done = true; 633 done = true;
634 break; 634 break;
635 } 635 }
636#ifdef HAS_BUTTONBAR 636#ifdef HAVE_BUTTONBAR
637 if (!hide_bars) 637 if (!hide_bars)
638 { 638 {
639 gui_buttonbar_set(&buttonbar, "<<<", "", ""); 639 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)
338 } 338 }
339 339
340 char outline[256]; 340 char outline[256];
341#ifdef HAS_BUTTONBAR 341#ifdef HAVE_BUTTONBAR
342 struct gui_buttonbar buttonbar; 342 struct gui_buttonbar buttonbar;
343 bool buttonbar_config = global_settings.buttonbar; 343 bool buttonbar_config = global_settings.buttonbar;
344 344
@@ -712,7 +712,7 @@ int kbd_input(char* text, int buflen)
712 712
713 cur_blink = !cur_blink; 713 cur_blink = !cur_blink;
714 714
715#ifdef HAS_BUTTONBAR 715#ifdef HAVE_BUTTONBAR
716 /* draw the button bar */ 716 /* draw the button bar */
717 gui_buttonbar_set(&buttonbar, "Shift", "OK", "Del"); 717 gui_buttonbar_set(&buttonbar, "Shift", "OK", "Del");
718 gui_buttonbar_draw(&buttonbar); 718 gui_buttonbar_draw(&buttonbar);
@@ -764,7 +764,7 @@ int kbd_input(char* text, int buflen)
764 FOR_NB_SCREENS(l) 764 FOR_NB_SCREENS(l)
765 screens[l].setfont(FONT_UI); 765 screens[l].setfont(FONT_UI);
766 766
767#ifdef HAS_BUTTONBAR 767#ifdef HAVE_BUTTONBAR
768 global_settings.buttonbar=buttonbar_config; 768 global_settings.buttonbar=buttonbar_config;
769#endif 769#endif
770 return -1; 770 return -1;
@@ -1230,7 +1230,7 @@ int kbd_input(char* text, int buflen)
1230 } 1230 }
1231 } 1231 }
1232 1232
1233#ifdef HAS_BUTTONBAR 1233#ifdef HAVE_BUTTONBAR
1234 global_settings.buttonbar = buttonbar_config; 1234 global_settings.buttonbar = buttonbar_config;
1235#endif 1235#endif
1236 1236
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)
452 int button_timeout = current_tick + (2*HZ); 452 int button_timeout = current_tick + (2*HZ);
453#endif 453#endif
454 struct viewport vp[NB_SCREENS]; 454 struct viewport vp[NB_SCREENS];
455#ifdef HAS_BUTTONBAR 455#ifdef HAVE_BUTTONBAR
456 struct gui_buttonbar buttonbar; 456 struct gui_buttonbar buttonbar;
457 gui_buttonbar_init(&buttonbar); 457 gui_buttonbar_init(&buttonbar);
458 gui_buttonbar_set_display(&buttonbar, &(screens[SCREEN_MAIN]) ); 458 gui_buttonbar_set_display(&buttonbar, &(screens[SCREEN_MAIN]) );
@@ -468,7 +468,7 @@ int radio_screen(void)
468 FOR_NB_SCREENS(i) 468 FOR_NB_SCREENS(i)
469 { 469 {
470 viewport_set_defaults(&vp[i], i); 470 viewport_set_defaults(&vp[i], i);
471#ifdef HAS_BUTTONBAR 471#ifdef HAVE_BUTTONBAR
472 if (global_settings.buttonbar) 472 if (global_settings.buttonbar)
473 vp[i].height -= BUTTONBAR_HEIGHT; 473 vp[i].height -= BUTTONBAR_HEIGHT;
474#endif 474#endif
@@ -532,7 +532,7 @@ int radio_screen(void)
532 if(curr_preset != -1) 532 if(curr_preset != -1)
533 radio_mode = RADIO_PRESET_MODE; 533 radio_mode = RADIO_PRESET_MODE;
534 534
535#ifdef HAS_BUTTONBAR 535#ifdef HAVE_BUTTONBAR
536 gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU), 536 gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU),
537 str(LANG_PRESET), str(LANG_FM_BUTTONBAR_RECORD)); 537 str(LANG_PRESET), str(LANG_FM_BUTTONBAR_RECORD));
538#endif 538#endif
@@ -728,7 +728,7 @@ int radio_screen(void)
728 screens[i].update_viewport(); 728 screens[i].update_viewport();
729 screens[i].set_viewport(NULL); 729 screens[i].set_viewport(NULL);
730 } 730 }
731#ifdef HAS_BUTTONBAR 731#ifdef HAVE_BUTTONBAR
732 gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU), 732 gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU),
733 str(LANG_PRESET), 733 str(LANG_PRESET),
734 str(LANG_FM_BUTTONBAR_RECORD)); 734 str(LANG_FM_BUTTONBAR_RECORD));
@@ -760,7 +760,7 @@ int radio_screen(void)
760 screens[i].update_viewport(); 760 screens[i].update_viewport();
761 screens[i].set_viewport(NULL); 761 screens[i].set_viewport(NULL);
762 } 762 }
763#ifdef HAS_BUTTONBAR 763#ifdef HAVE_BUTTONBAR
764 gui_buttonbar_set(&buttonbar, 764 gui_buttonbar_set(&buttonbar,
765 str(LANG_BUTTONBAR_MENU), 765 str(LANG_BUTTONBAR_MENU),
766 str(LANG_PRESET), 766 str(LANG_PRESET),
@@ -952,7 +952,7 @@ int radio_screen(void)
952 screens[i].set_viewport(NULL); 952 screens[i].set_viewport(NULL);
953 } 953 }
954 954
955#ifdef HAS_BUTTONBAR 955#ifdef HAVE_BUTTONBAR
956 gui_buttonbar_draw(&buttonbar); 956 gui_buttonbar_draw(&buttonbar);
957#endif 957#endif
958 } 958 }
@@ -1337,14 +1337,14 @@ static int handle_radio_presets(void)
1337 struct gui_synclist lists; 1337 struct gui_synclist lists;
1338 int result = 0; 1338 int result = 0;
1339 int action = ACTION_NONE; 1339 int action = ACTION_NONE;
1340#ifdef HAS_BUTTONBAR 1340#ifdef HAVE_BUTTONBAR
1341 struct gui_buttonbar buttonbar; 1341 struct gui_buttonbar buttonbar;
1342#endif 1342#endif
1343 1343
1344 if(presets_loaded == false) 1344 if(presets_loaded == false)
1345 return result; 1345 return result;
1346 1346
1347#ifdef HAS_BUTTONBAR 1347#ifdef HAVE_BUTTONBAR
1348 gui_buttonbar_init(&buttonbar); 1348 gui_buttonbar_init(&buttonbar);
1349 gui_buttonbar_set_display(&buttonbar, &(screens[SCREEN_MAIN]) ); 1349 gui_buttonbar_set_display(&buttonbar, &(screens[SCREEN_MAIN]) );
1350 gui_buttonbar_set(&buttonbar, str(LANG_FM_BUTTONBAR_ADD), 1350 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] =
128 .backlight_off=&backlight_off, 128 .backlight_off=&backlight_off,
129 .is_backlight_on=&is_backlight_on, 129 .is_backlight_on=&is_backlight_on,
130 .backlight_set_timeout=&backlight_set_timeout, 130 .backlight_set_timeout=&backlight_set_timeout,
131#ifdef HAS_BUTTONBAR 131#ifdef HAVE_BUTTONBAR
132 .has_buttonbar=false 132 .has_buttonbar=false
133#endif 133#endif
134 }, 134 },
@@ -239,7 +239,7 @@ void screen_access_init(void)
239#ifdef HAVE_LCD_BITMAP 239#ifdef HAVE_LCD_BITMAP
240 if(global_settings.statusbar) 240 if(global_settings.statusbar)
241 height -= STATUSBAR_HEIGHT; 241 height -= STATUSBAR_HEIGHT;
242#ifdef HAS_BUTTONBAR 242#ifdef HAVE_BUTTONBAR
243 if(global_settings.buttonbar && display->has_buttonbar) 243 if(global_settings.buttonbar && display->has_buttonbar)
244 height -= BUTTONBAR_HEIGHT; 244 height -= BUTTONBAR_HEIGHT;
245#endif 245#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
68#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) 68#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
69 bool has_disk_led; 69 bool has_disk_led;
70#endif 70#endif
71#ifdef HAS_BUTTONBAR 71#ifdef HAVE_BUTTONBAR
72 bool has_buttonbar; 72 bool has_buttonbar;
73#endif 73#endif
74 void (*set_viewport)(struct viewport* vp); 74 void (*set_viewport)(struct viewport* vp);
@@ -155,7 +155,7 @@ struct screen
155 void (*backlight_set_timeout)(int index); 155 void (*backlight_set_timeout)(int index);
156}; 156};
157 157
158#ifdef HAS_BUTTONBAR 158#ifdef HAVE_BUTTONBAR
159/* 159/*
160 * Sets if the given screen has a buttonbar or not 160 * Sets if the given screen has a buttonbar or not
161 * - screen : the screen structure 161 * - 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;
89 89
90/* I put it here because other files doesn't use it yet, 90/* I put it here because other files doesn't use it yet,
91 * but should be elsewhere since it will be used mostly everywhere */ 91 * but should be elsewhere since it will be used mostly everywhere */
92#ifdef HAS_BUTTONBAR 92#ifdef HAVE_BUTTONBAR
93struct gui_buttonbar tree_buttonbar; 93struct gui_buttonbar tree_buttonbar;
94#endif 94#endif
95static struct tree_context tc; 95static struct tree_context tc;
@@ -299,7 +299,7 @@ void tree_gui_init(void)
299 FOR_NB_SCREENS(i) 299 FOR_NB_SCREENS(i)
300 screens[i].double_height(false); 300 screens[i].double_height(false);
301#endif 301#endif
302#ifdef HAS_BUTTONBAR 302#ifdef HAVE_BUTTONBAR
303 gui_buttonbar_init(&tree_buttonbar); 303 gui_buttonbar_init(&tree_buttonbar);
304 /* since archos only have one screen, no need to create more than that */ 304 /* since archos only have one screen, no need to create more than that */
305 gui_buttonbar_set_display(&tree_buttonbar, &(screens[SCREEN_MAIN]) ); 305 gui_buttonbar_set_display(&tree_buttonbar, &(screens[SCREEN_MAIN]) );
@@ -463,7 +463,7 @@ static int update_dir(void)
463 tc.selected_item=tc.filesindir-1; 463 tc.selected_item=tc.filesindir-1;
464 464
465 gui_synclist_select_item(&tree_lists, tc.selected_item); 465 gui_synclist_select_item(&tree_lists, tc.selected_item);
466#ifdef HAS_BUTTONBAR 466#ifdef HAVE_BUTTONBAR
467 if (global_settings.buttonbar) { 467 if (global_settings.buttonbar) {
468 if (*tc.dirfilter < NUM_FILTER_MODES) 468 if (*tc.dirfilter < NUM_FILTER_MODES)
469 gui_buttonbar_set(&tree_buttonbar, str(LANG_SYSFONT_DIRBROWSE_F1), 469 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 @@
22/* define this if you have access to the pitchscreen */ 22/* define this if you have access to the pitchscreen */
23#define HAVE_PITCHSCREEN 23#define HAVE_PITCHSCREEN
24/* define this if you have the button bar */ 24/* define this if you have the button bar */
25#define HAS_BUTTONBAR 25#define HAVE_BUTTONBAR
26 26
27/* define this if you would like tagcache to build on this target */ 27/* define this if you would like tagcache to build on this target */
28#define HAVE_TAGCACHE 28#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 @@
22/* define this if you have access to the pitchscreen */ 22/* define this if you have access to the pitchscreen */
23#define HAVE_PITCHSCREEN 23#define HAVE_PITCHSCREEN
24/* define this if you have the button bar */ 24/* define this if you have the button bar */
25#define HAS_BUTTONBAR 25#define HAVE_BUTTONBAR
26 26
27/* define this if you would like tagcache to build on this target */ 27/* define this if you would like tagcache to build on this target */
28#define HAVE_TAGCACHE 28#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 @@
22/* define this if you have access to the pitchscreen */ 22/* define this if you have access to the pitchscreen */
23#define HAVE_PITCHSCREEN 23#define HAVE_PITCHSCREEN
24/* define this if you have the button bar */ 24/* define this if you have the button bar */
25#define HAS_BUTTONBAR 25#define HAVE_BUTTONBAR
26 26
27/* define this if you would like tagcache to build on this target */ 27/* define this if you would like tagcache to build on this target */
28#define HAVE_TAGCACHE 28#define HAVE_TAGCACHE