diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-15 19:40:55 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 092c340a2062fa98b7387fc5fd63578ddae7d0b6 (patch) | |
tree | 98ec96946eeb2ae709cb0528cc6998e21bb9b290 /apps/recorder/keyboard.c | |
parent | 17f7cc92c258bc456a27c3e7c5a19c9409851879 (diff) | |
download | rockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.tar.gz rockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.zip |
[1/4] Remove SH support and all archos targets
This removes all code specific to SH targets
Change-Id: I7980523785d2596e65c06430f4638eec74a06061
Diffstat (limited to 'apps/recorder/keyboard.c')
-rw-r--r-- | apps/recorder/keyboard.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c index 6e91d69b6d..4b19287b7f 100644 --- a/apps/recorder/keyboard.c +++ b/apps/recorder/keyboard.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include "settings.h" | 27 | #include "settings.h" |
28 | #include "misc.h" | 28 | #include "misc.h" |
29 | #include "rbunicode.h" | 29 | #include "rbunicode.h" |
30 | #include "buttonbar.h" | ||
31 | #include "logf.h" | 30 | #include "logf.h" |
32 | #include "hangul.h" | 31 | #include "hangul.h" |
33 | #include "action.h" | 32 | #include "action.h" |
@@ -343,15 +342,6 @@ int kbd_input(char* text, int buflen, unsigned short *kbd) | |||
343 | viewportmanager_theme_enable(l, false, NULL); | 342 | viewportmanager_theme_enable(l, false, NULL); |
344 | } | 343 | } |
345 | 344 | ||
346 | #ifdef HAVE_BUTTONBAR | ||
347 | struct gui_buttonbar buttonbar; | ||
348 | bool buttonbar_config = global_settings.buttonbar; | ||
349 | |||
350 | global_settings.buttonbar = true; | ||
351 | gui_buttonbar_init(&buttonbar); | ||
352 | gui_buttonbar_set_display(&buttonbar, &screens[SCREEN_MAIN]); | ||
353 | #endif | ||
354 | |||
355 | /* initialize state */ | 345 | /* initialize state */ |
356 | state.text = text; | 346 | state.text = text; |
357 | state.buflen = buflen; | 347 | state.buflen = buflen; |
@@ -482,12 +472,6 @@ int kbd_input(char* text, int buflen, unsigned short *kbd) | |||
482 | #endif | 472 | #endif |
483 | } | 473 | } |
484 | 474 | ||
485 | #ifdef HAVE_BUTTONBAR | ||
486 | /* draw the button bar */ | ||
487 | gui_buttonbar_set(&buttonbar, "Shift", "OK", "Del"); | ||
488 | gui_buttonbar_draw(&buttonbar); | ||
489 | #endif | ||
490 | |||
491 | FOR_NB_SCREENS(l) | 475 | FOR_NB_SCREENS(l) |
492 | screens[l].update(); | 476 | screens[l].update(); |
493 | 477 | ||
@@ -693,10 +677,6 @@ int kbd_input(char* text, int buflen, unsigned short *kbd) | |||
693 | state.changed = 0; | 677 | state.changed = 0; |
694 | } | 678 | } |
695 | 679 | ||
696 | #ifdef HAVE_BUTTONBAR | ||
697 | global_settings.buttonbar = buttonbar_config; | ||
698 | #endif | ||
699 | |||
700 | if (ret < 0) | 680 | if (ret < 0) |
701 | splash(HZ/2, ID2P(LANG_CANCEL)); | 681 | splash(HZ/2, ID2P(LANG_CANCEL)); |
702 | 682 | ||
@@ -736,7 +716,7 @@ static void kbd_calc_params(struct keyboard_parameters *pm, | |||
736 | pm->font_h = font->height; | 716 | pm->font_h = font->height; |
737 | 717 | ||
738 | /* check if FONT_UI fits the screen */ | 718 | /* check if FONT_UI fits the screen */ |
739 | if (2*pm->font_h + 3 + BUTTONBAR_HEIGHT > sc->getheight()) | 719 | if (2*pm->font_h + 3 > sc->getheight()) |
740 | { | 720 | { |
741 | pm->curfont = FONT_SYSFIXED; | 721 | pm->curfont = FONT_SYSFIXED; |
742 | font = font_get(FONT_SYSFIXED); | 722 | font = font_get(FONT_SYSFIXED); |
@@ -796,13 +776,12 @@ static void kbd_calc_params(struct keyboard_parameters *pm, | |||
796 | } | 776 | } |
797 | recalc_param: | 777 | recalc_param: |
798 | #endif | 778 | #endif |
799 | pm->lines = (sc_h - BUTTONBAR_HEIGHT) / pm->font_h - 1; | 779 | pm->lines = sc_h / pm->font_h - 1; |
800 | 780 | ||
801 | if (pm->default_lines && pm->lines > pm->default_lines) | 781 | if (pm->default_lines && pm->lines > pm->default_lines) |
802 | pm->lines = pm->default_lines; | 782 | pm->lines = pm->default_lines; |
803 | 783 | ||
804 | pm->keyboard_margin = sc_h - BUTTONBAR_HEIGHT | 784 | pm->keyboard_margin = sc_h - (pm->lines+1)*pm->font_h; |
805 | - (pm->lines+1)*pm->font_h; | ||
806 | 785 | ||
807 | if (pm->keyboard_margin < 3 && pm->lines > 1) | 786 | if (pm->keyboard_margin < 3 && pm->lines > 1) |
808 | { | 787 | { |
@@ -840,7 +819,7 @@ recalc_param: | |||
840 | #endif | 819 | #endif |
841 | 820 | ||
842 | #ifdef HAVE_MORSE_INPUT | 821 | #ifdef HAVE_MORSE_INPUT |
843 | pm->old_main_y = sc_h - pm->font_h - BUTTONBAR_HEIGHT; | 822 | pm->old_main_y = sc_h - pm->font_h; |
844 | if (state->morse_mode) | 823 | if (state->morse_mode) |
845 | { | 824 | { |
846 | int y = pm->main_y; | 825 | int y = pm->main_y; |