Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Simplifying simple lists

Simplifying simple lists

From: Al Le <Al.Le_at_gmx.de>
Date: Thu, 08 Apr 2010 14:24:42 +0200

Hello.

I'm looking at the simple list implementation and find it not as simple as it could/should be. I'd like to do the following changes as a first step:

1. Eliminate the 'count' parameter of the function 'simplelist_info_init'. If the custom 'get_name' callback is not set then the value of 'count' is ignored and the static value 'simplelist_line_count' is used instead. Hence, if you set a custom name callback you'll also set the number of items. But if you don't use a custom callback (most of the time I think) you shouldn't be forced to provide the count parameter.

2. In the function 'simplelist_info_init', I'd also set the value of simplelist_line_count to zero. Since at that point we begin to construct a new list. After a call to 'simplelist_info_init' we should be able to just call 'simplelist_addline' without any intermediate actions. As of now, you must call 'simplelist_set_line_count' in between.

Any comments / thoughts / objections?


I have other thoughts about this API, but I'll post them later in a separate mail.
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
Received on 2010-04-08

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy