1
0
Fork 0
forked from len0rd/rockbox

remove the seelection_size param from the info init call to hopefully decrease the bin size a bit

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15237 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2007-10-21 06:42:52 +00:00
parent 5eac0108f9
commit 616971c71e
4 changed files with 12 additions and 10 deletions

View file

@ -180,7 +180,7 @@ static int dbg_threads_action_callback(int action, struct gui_synclist *lists)
static bool dbg_os(void) static bool dbg_os(void)
{ {
struct simplelist_info info; struct simplelist_info info;
simplelist_info_init(&info, IF_COP("Core and ") "Stack usage:", 1, simplelist_info_init(&info, IF_COP("Core and ") "Stack usage:",
#if NUM_CORES == 1 #if NUM_CORES == 1
MAXTHREADS, MAXTHREADS,
#else #else
@ -731,7 +731,8 @@ static char* dbg_partitions_getname(int selected_item, void * data, char *buffer
bool dbg_partitions(void) bool dbg_partitions(void)
{ {
struct simplelist_info info; struct simplelist_info info;
simplelist_info_init(&info, "Partition Info", 2, 4, NULL); simplelist_info_init(&info, "Partition Info", 4, NULL);
info.selection_size = 2;
info.hide_selection = true; info.hide_selection = true;
info.get_name = dbg_partitions_getname; info.get_name = dbg_partitions_getname;
return simplelist_show_list(&info); return simplelist_show_list(&info);
@ -1783,7 +1784,7 @@ static int disk_callback(int btn, struct gui_synclist *lists)
static bool dbg_disk_info(void) static bool dbg_disk_info(void)
{ {
struct simplelist_info info; struct simplelist_info info;
simplelist_info_init(&info, "Disk Info", 1,1, NULL); simplelist_info_init(&info, "Disk Info", 1, NULL);
#if defined(HAVE_MMC) || defined(HAVE_HOTSWAP) #if defined(HAVE_MMC) || defined(HAVE_HOTSWAP)
char title[16]; char title[16];
int card = 0; int card = 0;
@ -1821,7 +1822,7 @@ static int dircache_callback(int btn, struct gui_synclist *lists)
static bool dbg_dircache_info(void) static bool dbg_dircache_info(void)
{ {
struct simplelist_info info; struct simplelist_info info;
simplelist_info_init(&info, "Dircache Info", 1, 7, NULL); simplelist_info_init(&info, "Dircache Info", 7, NULL);
info.action_callback = dircache_callback; info.action_callback = dircache_callback;
info.hide_selection = true; info.hide_selection = true;
return simplelist_show_list(&info); return simplelist_show_list(&info);
@ -1854,7 +1855,7 @@ static int database_callback(int btn, struct gui_synclist *lists)
static bool dbg_tagcache_info(void) static bool dbg_tagcache_info(void)
{ {
struct simplelist_info info; struct simplelist_info info;
simplelist_info_init(&info, "Database Info", 1, 7, NULL); simplelist_info_init(&info, "Database Info", 7, NULL);
info.action_callback = database_callback; info.action_callback = database_callback;
info.hide_selection = true; info.hide_selection = true;
return simplelist_show_list(&info); return simplelist_show_list(&info);
@ -1996,7 +1997,7 @@ static int radio_callback(int btn, struct gui_synclist *lists)
static bool dbg_fm_radio(void) static bool dbg_fm_radio(void)
{ {
struct simplelist_info info; struct simplelist_info info;
simplelist_info_init(&info, "FM Radio", 1, 1, NULL); simplelist_info_init(&info, "FM Radio", 1, NULL);
simplelist_set_line_count(0); simplelist_set_line_count(0);
simplelist_addline(SIMPLELIST_ADD_LINE, "HW detected: %s", simplelist_addline(SIMPLELIST_ADD_LINE, "HW detected: %s",
radio_hardware_present() ? "yes" : "no"); radio_hardware_present() ? "yes" : "no");

View file

@ -487,7 +487,7 @@ int filetype_list_viewers(const char* current_file)
return PLUGIN_OK; return PLUGIN_OK;
} }
#endif #endif
simplelist_info_init(&info, str(LANG_ONPLAY_OPEN_WITH), 1, count, &data); simplelist_info_init(&info, str(LANG_ONPLAY_OPEN_WITH), count, &data);
info.action_callback = openwith_action_callback; info.action_callback = openwith_action_callback;
info.get_name = openwith_get_name; info.get_name = openwith_get_name;
info.get_icon = openwith_get_icon; info.get_icon = openwith_get_icon;

View file

@ -1209,11 +1209,11 @@ bool simplelist_show_list(struct simplelist_info *info)
} }
void simplelist_info_init(struct simplelist_info *info, char* title, void simplelist_info_init(struct simplelist_info *info, char* title,
int selection_size, int count, void* data) int count, void* data)
{ {
info->title = title; info->title = title;
info->count = count; info->count = count;
info->selection_size = selection_size; info->selection_size = 1;
info->hide_selection = false; info->hide_selection = false;
info->scroll_all = false; info->scroll_all = false;
info->action_callback = NULL; info->action_callback = NULL;

View file

@ -296,6 +296,7 @@ void simplelist_addline(int line_number, const char *fmt, ...);
/* setup the info struct. members not setup in this function need to be assigned manually /* setup the info struct. members not setup in this function need to be assigned manually
members set in this function: members set in this function:
info.selection_size = 1;
info.hide_selection = false; info.hide_selection = false;
info.scroll_all = false; info.scroll_all = false;
info.action_callback = NULL; info.action_callback = NULL;
@ -304,7 +305,7 @@ void simplelist_addline(int line_number, const char *fmt, ...);
info.get_voice = NULL; info.get_voice = NULL;
*/ */
void simplelist_info_init(struct simplelist_info *info, char* title, void simplelist_info_init(struct simplelist_info *info, char* title,
int selection_size, int count, void* data); int count, void* data);
/* show a list. /* show a list.
if list->action_callback != NULL it is called with the action ACTION_REDRAW if list->action_callback != NULL it is called with the action ACTION_REDRAW