summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-10-21 06:42:52 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-10-21 06:42:52 +0000
commit616971c71eaee14cc9e16fe105d34c202babbf7c (patch)
tree2b0497996057dedbeeac5a5ec7ac717087ed3f5b
parent5eac0108f973bc5a132807775f9815b789e0c787 (diff)
downloadrockbox-616971c71eaee14cc9e16fe105d34c202babbf7c.tar.gz
rockbox-616971c71eaee14cc9e16fe105d34c202babbf7c.zip
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
-rw-r--r--apps/debug_menu.c13
-rw-r--r--apps/filetypes.c2
-rw-r--r--apps/gui/list.c4
-rw-r--r--apps/gui/list.h3
4 files changed, 12 insertions, 10 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index b654bb6dcc..995333e582 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -180,7 +180,7 @@ static int dbg_threads_action_callback(int action, struct gui_synclist *lists)
180static bool dbg_os(void) 180static bool dbg_os(void)
181{ 181{
182 struct simplelist_info info; 182 struct simplelist_info info;
183 simplelist_info_init(&info, IF_COP("Core and ") "Stack usage:", 1, 183 simplelist_info_init(&info, IF_COP("Core and ") "Stack usage:",
184#if NUM_CORES == 1 184#if NUM_CORES == 1
185 MAXTHREADS, 185 MAXTHREADS,
186#else 186#else
@@ -731,7 +731,8 @@ static char* dbg_partitions_getname(int selected_item, void * data, char *buffer
731bool dbg_partitions(void) 731bool dbg_partitions(void)
732{ 732{
733 struct simplelist_info info; 733 struct simplelist_info info;
734 simplelist_info_init(&info, "Partition Info", 2, 4, NULL); 734 simplelist_info_init(&info, "Partition Info", 4, NULL);
735 info.selection_size = 2;
735 info.hide_selection = true; 736 info.hide_selection = true;
736 info.get_name = dbg_partitions_getname; 737 info.get_name = dbg_partitions_getname;
737 return simplelist_show_list(&info); 738 return simplelist_show_list(&info);
@@ -1783,7 +1784,7 @@ static int disk_callback(int btn, struct gui_synclist *lists)
1783static bool dbg_disk_info(void) 1784static bool dbg_disk_info(void)
1784{ 1785{
1785 struct simplelist_info info; 1786 struct simplelist_info info;
1786 simplelist_info_init(&info, "Disk Info", 1,1, NULL); 1787 simplelist_info_init(&info, "Disk Info", 1, NULL);
1787#if defined(HAVE_MMC) || defined(HAVE_HOTSWAP) 1788#if defined(HAVE_MMC) || defined(HAVE_HOTSWAP)
1788 char title[16]; 1789 char title[16];
1789 int card = 0; 1790 int card = 0;
@@ -1821,7 +1822,7 @@ static int dircache_callback(int btn, struct gui_synclist *lists)
1821static bool dbg_dircache_info(void) 1822static bool dbg_dircache_info(void)
1822{ 1823{
1823 struct simplelist_info info; 1824 struct simplelist_info info;
1824 simplelist_info_init(&info, "Dircache Info", 1, 7, NULL); 1825 simplelist_info_init(&info, "Dircache Info", 7, NULL);
1825 info.action_callback = dircache_callback; 1826 info.action_callback = dircache_callback;
1826 info.hide_selection = true; 1827 info.hide_selection = true;
1827 return simplelist_show_list(&info); 1828 return simplelist_show_list(&info);
@@ -1854,7 +1855,7 @@ static int database_callback(int btn, struct gui_synclist *lists)
1854static bool dbg_tagcache_info(void) 1855static bool dbg_tagcache_info(void)
1855{ 1856{
1856 struct simplelist_info info; 1857 struct simplelist_info info;
1857 simplelist_info_init(&info, "Database Info", 1, 7, NULL); 1858 simplelist_info_init(&info, "Database Info", 7, NULL);
1858 info.action_callback = database_callback; 1859 info.action_callback = database_callback;
1859 info.hide_selection = true; 1860 info.hide_selection = true;
1860 return simplelist_show_list(&info); 1861 return simplelist_show_list(&info);
@@ -1996,7 +1997,7 @@ static int radio_callback(int btn, struct gui_synclist *lists)
1996static bool dbg_fm_radio(void) 1997static bool dbg_fm_radio(void)
1997{ 1998{
1998 struct simplelist_info info; 1999 struct simplelist_info info;
1999 simplelist_info_init(&info, "FM Radio", 1, 1, NULL); 2000 simplelist_info_init(&info, "FM Radio", 1, NULL);
2000 simplelist_set_line_count(0); 2001 simplelist_set_line_count(0);
2001 simplelist_addline(SIMPLELIST_ADD_LINE, "HW detected: %s", 2002 simplelist_addline(SIMPLELIST_ADD_LINE, "HW detected: %s",
2002 radio_hardware_present() ? "yes" : "no"); 2003 radio_hardware_present() ? "yes" : "no");
diff --git a/apps/filetypes.c b/apps/filetypes.c
index 3f1fa7d19b..5c74103cf1 100644
--- a/apps/filetypes.c
+++ b/apps/filetypes.c
@@ -487,7 +487,7 @@ int filetype_list_viewers(const char* current_file)
487 return PLUGIN_OK; 487 return PLUGIN_OK;
488 } 488 }
489#endif 489#endif
490 simplelist_info_init(&info, str(LANG_ONPLAY_OPEN_WITH), 1, count, &data); 490 simplelist_info_init(&info, str(LANG_ONPLAY_OPEN_WITH), count, &data);
491 info.action_callback = openwith_action_callback; 491 info.action_callback = openwith_action_callback;
492 info.get_name = openwith_get_name; 492 info.get_name = openwith_get_name;
493 info.get_icon = openwith_get_icon; 493 info.get_icon = openwith_get_icon;
diff --git a/apps/gui/list.c b/apps/gui/list.c
index cc66e25a48..6727f9b998 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -1209,11 +1209,11 @@ bool simplelist_show_list(struct simplelist_info *info)
1209} 1209}
1210 1210
1211void simplelist_info_init(struct simplelist_info *info, char* title, 1211void simplelist_info_init(struct simplelist_info *info, char* title,
1212 int selection_size, int count, void* data) 1212 int count, void* data)
1213{ 1213{
1214 info->title = title; 1214 info->title = title;
1215 info->count = count; 1215 info->count = count;
1216 info->selection_size = selection_size; 1216 info->selection_size = 1;
1217 info->hide_selection = false; 1217 info->hide_selection = false;
1218 info->scroll_all = false; 1218 info->scroll_all = false;
1219 info->action_callback = NULL; 1219 info->action_callback = NULL;
diff --git a/apps/gui/list.h b/apps/gui/list.h
index 7b9ef94ba8..e6a80f4714 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -296,6 +296,7 @@ void simplelist_addline(int line_number, const char *fmt, ...);
296 296
297/* setup the info struct. members not setup in this function need to be assigned manually 297/* setup the info struct. members not setup in this function need to be assigned manually
298 members set in this function: 298 members set in this function:
299 info.selection_size = 1;
299 info.hide_selection = false; 300 info.hide_selection = false;
300 info.scroll_all = false; 301 info.scroll_all = false;
301 info.action_callback = NULL; 302 info.action_callback = NULL;
@@ -304,7 +305,7 @@ void simplelist_addline(int line_number, const char *fmt, ...);
304 info.get_voice = NULL; 305 info.get_voice = NULL;
305*/ 306*/
306void simplelist_info_init(struct simplelist_info *info, char* title, 307void simplelist_info_init(struct simplelist_info *info, char* title,
307 int selection_size, int count, void* data); 308 int count, void* data);
308 309
309/* show a list. 310/* show a list.
310 if list->action_callback != NULL it is called with the action ACTION_REDRAW 311 if list->action_callback != NULL it is called with the action ACTION_REDRAW