-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Menu item generators #4
Comments
I've decided that the most likely approach I'll take to this is an additional config entry type (as opposed to restructuring the entire config). It'll look like |
To simplify things, I'll keep the generator stuff in the config file parser, and have another function (which will be called after the config file is parsed) which expands them (to more config entries/menu items or to an error menu item) recursively (if we expand to config entries -- this is easy to implement because we use linked lists; we just need to change the pointer to the next item to point to the first generated one). If we end up needing async stuff or retries later, I'll refactor the config parser into something more suitable. I haven't decided if I'll have it generate menu items (for a specific location), or generic config entries (and it'll be up to the generator to handle the location, but it'll be more extensible in the future). I'm slightly leaning towards the first option, as I'd rather refactor the config parser (mainly the parts which allocate/append the objects) before doing anymore major changes (it's been getting somewhat messy). On the other hand, the second option would allow us to reuse most of the linked list stuff from the config (but it would mean that nm_config_t would need to be made visible to the other files). |
Continued from the discussion in geek1011/kobo-plugin-experiments#2.
The text was updated successfully, but these errors were encountered: