diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-08-16 22:00:38 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-08-16 22:00:38 +0000 |
| commit | c0897a8002d493244efd69fca5c433dbafe8d5be (patch) | |
| tree | 0be8a3283280c96d3b9f85e00e5c1ee505b7d77e /apps/menus | |
| parent | b395f89a31a51fad6311acd671ffd9487e32c130 (diff) | |
| download | rockbox-c0897a8002d493244efd69fca5c433dbafe8d5be.zip rockbox-c0897a8002d493244efd69fca5c433dbafe8d5be.tar.gz rockbox-c0897a8002d493244efd69fca5c433dbafe8d5be.tar.bz2 rockbox-c0897a8002d493244efd69fca5c433dbafe8d5be.tar.xz | |
remove the rockbox info line saying the AA size and replace it with skin RAM usage
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22364 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus')
| -rw-r--r-- | apps/menus/main_menu.c | 54 |
1 files changed, 18 insertions, 36 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index 033f7e2..132eab9 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c @@ -50,6 +50,7 @@ #include "version.h" #include "time.h" #include "wps.h" +#include "skin_engine/skin_buffer.h" static const struct browse_folder_info config = {ROCKBOX_DIR, SHOW_CFG}; @@ -144,9 +145,7 @@ enum infoscreenorder INFO_DISK1, /* capacity or internal capacity/free on hotswap */ INFO_DISK2, /* free space or external capacity/free on hotswap */ INFO_BUFFER, -#ifdef HAVE_ALBUMART - INFO_ALBUMART, -#endif + INFO_SKIN_USAGE, /* ram usage of the skins */ INFO_VERSION, INFO_COUNT }; @@ -158,6 +157,13 @@ static const unsigned char *kbyte_units[] = ID2P(LANG_GIGABYTE) }; +static const unsigned char *byte_units[] = +{ + ID2P(LANG_BYTE), + ID2P(LANG_KILOBYTE), + ID2P(LANG_MEGABYTE) +}; + static char* info_getname(int selected_item, void *data, char *buffer, size_t buffer_len) { @@ -250,22 +256,10 @@ static char* info_getname(int selected_item, void *data, snprintf(buffer, buffer_len, SIZE_FMT, str(LANG_DISK_SIZE_INFO), s1); #endif break; -#ifdef HAVE_ALBUMART - case INFO_ALBUMART: /* album art dimenstions */ - { - int width = 0, height = 0; - if (wps_uses_albumart(&width, &height)) - { - snprintf(buffer, buffer_len, "%s %dx%d", str(LANG_ALBUMART), - width, height); - } - else - { - snprintf(buffer, buffer_len, "%s %s", str(LANG_ALBUMART), - str(LANG_SET_BOOL_NO)); - } - } break; -#endif + case INFO_SKIN_USAGE: + output_dyn_value(s1, sizeof s1, skin_buffer_usage(), byte_units, true); + snprintf(buffer, buffer_len, "%s %s", str(LANG_SKIN_RAM_USAGE), s1); + break; } return buffer; } @@ -347,23 +341,11 @@ static int info_speak_item(int selected_item, void * data) output_dyn_value(NULL, 0, info->size, kbyte_units, true); #endif break; -#ifdef HAVE_ALBUMART - case INFO_ALBUMART: /* album art dimenstions */ - { - int width = 0, height = 0; - if (wps_uses_albumart(&width, &height)) - { - talk_id(LANG_ALBUMART, false); - talk_value(width, UNIT_PIXEL, true); - talk_value(height, UNIT_PIXEL, true); - } - else - { - talk_id(LANG_ALBUMART, false); - talk_id(LANG_SET_BOOL_NO, true); - } - } break; -#endif + case INFO_SKIN_USAGE: + talk_id(LANG_SKIN_RAM_USAGE, false); + output_dyn_value(NULL, 0, skin_buffer_usage(), byte_units, true); + break; + } return 0; } |