summaryrefslogtreecommitdiffstats
path: root/apps/screen_access.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-05-29 11:13:46 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-05-29 11:13:46 +0000
commit0501fb016c4d88d3430a34ecc55a003e062b5f63 (patch)
tree272d3d3c33190c499d2ee4507f23cf532c85e46e /apps/screen_access.c
parent43f0770943a3315561dbdcdb2bbb85b7026248b1 (diff)
downloadrockbox-0501fb016c4d88d3430a34ecc55a003e062b5f63.tar.gz
rockbox-0501fb016c4d88d3430a34ecc55a003e062b5f63.tar.bz2
rockbox-0501fb016c4d88d3430a34ecc55a003e062b5f63.zip
total removal of gui_textarea. The only thing using the text_message struct is the yesno screen so move its definition to yesno.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17653 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/screen_access.c')
-rw-r--r--apps/screen_access.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/apps/screen_access.c b/apps/screen_access.c
index dbd3727a26..82f80638af 100644
--- a/apps/screen_access.c
+++ b/apps/screen_access.c
@@ -29,7 +29,6 @@
#include <icons.h>
#include "screen_access.h"
-#include "textarea.h"
struct screen screens[NB_SCREENS] =
{
@@ -228,11 +227,28 @@ void screen_clear_area(struct screen * display, int xstart, int ystart,
void screen_access_init(void)
{
int i;
+ struct screen *display;
FOR_NB_SCREENS(i)
{
+ display = &screens[i];
#ifdef HAVE_LCD_BITMAP
((struct screen*)&screens[i])->setfont(FONT_UI);
#endif
- gui_textarea_update_nblines(&screens[i]);
+
+ int height=display->height;
+#ifdef HAVE_LCD_BITMAP
+ if(global_settings.statusbar)
+ height -= STATUSBAR_HEIGHT;
+#ifdef HAS_BUTTONBAR
+ if(global_settings.buttonbar && display->has_buttonbar)
+ height -= BUTTONBAR_HEIGHT;
+#endif
+ display->getstringsize((unsigned char *)"A", &display->char_width,
+ &display->char_height);
+#else
+ display->char_width = 1;
+ display->char_height = 1;
+#endif
+ display->nb_lines = height / display->char_height;
}
}