Details

This is a shopping list plugin. I used the text editor plugin as a starting point, so in theory this plugin should run on any of the devices the text editor can run on, although I've only tested it on the Sansa Fuze v1.

To apply the patch, go to the level above your rockbox source directory and do patch -p0 < shopper.patch.

Hope you will find it of use; I've been using it for some time for my weekly food shopping!

Description
---------------

Shopper is a shopping list plugin which allows you to maintain reusable shopping lists. You should create a text file called <name>.list, for example shopping.list, and use a text editor to make a list the items you might want to buy. You will later be able to select which of these items you want to buy at a particular time. If you want to separate the items you can do so by creating categories, which are prepended with '#'.

For example, shopping.list could contain

# groceries
bananas
cucumber
4 apples
6 apples
# dairy
milk
cheese

Note that it isn't possible to choose exact quantities, so I often create a number of entries with different quantities in the name of the item, such as for the apples in the above example.

Once you've made your list, if you select the filename in the file viewer in Rockbox, Shopper will load it automatically.

There are two modes, edit mode and view mode. The edit mode shows all the items, and it allows you to select which of the items you want to buy. When you have finished selecting the items, use the menu to go to the view mode, and you will see only the items you wish to buy. If you 'select' an item in view mode then that item will be removed from the list.

When you exit Shopper the last view is saved, including which items you have selected, so if you re-open the shopping list it will be as you left it. There are additional menu options for clearing the list, selecting all items, showing and hiding the categories, toggling the categories, and displaying the playback menu.

* the category for this plugin in apps/plugins/CATEGORIES should probably be "viewers" instead of "apps" since it just returns an error if started without parameter so there's no need to have it in the apps list.

* you break some style guidelines, see docs/CONTRIBUTING specifically "structs are structs, not typedefs" and "Braces for function declarations are put in a new line under the name"

I've taken your comments into consideration and have provided a new patch, which should adhere to the style guidelines. As you suggested, I've also added some checks to the file load function which should take care of long lists, and also some checks that the view information contained at the end of the file is valid.

Let me know if you'd like me to make any further changes, as I'm quite keen to get Shopper included in the Rockbox distribution ;-)