Is there a detailed API documentation on the python binding for appindicator?
I'm getting serous with a project of my own and need a good documentation on the appindicator module for python. What I've found so far:
- API documentation on dev.ubuntu.com
- Community wiki entry
- API documentation on the C code
- Nice blog post
what's wrong with them:
- Just a list with no explanations on the arguments, returns and on what the methods do
- Only design considerations and backgrounds - little that would help with actual programming
- Stuff missing the python module has (e.g. create_menu_from_desktop)
- Much useful information compressed but not complete
So basically I need something as detailed as 3. but for the python module.
Example on my problem:
void build_menu_from_desktop (desktop_file, desktop_profile)
What's are the arguments supposed to be and what does the method do? My guess is, the method creates menu entries from a '*.desktop' file. But if so, why does it need more arguments than just that file? Which entries in the file does it take the menu items from? It's questions like this I'm having a bit of a hard time finding an answer for.
Solution 1:
Yes, we realize that we need Python documentation with the appropriate level of detail. That is the goal of the Giraffe project. It will work with the GObject Introspection bindings which is the way that new Python applications should be written to use the application indicators.
Until then, the best bet is the API documentation that you've noted. It should be roughly the same though "python-ified".
The build_menu_from_desktop is a convenience function use load the entries that would otherwise be in something like a quicklist in Unity. So to get those entries you'd use build_menu_from_desktop("/my/path/myfile.desktop", "Unity")
to specify the TargetEnvironment.
This allows you to have different entries in the desktop file and have some overlap and others not.