Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

  1. API documentation on
  2. Community wiki entry
  3. API documentation on the C code
  4. Nice blog post

what's wrong with them:

  1. Just a list with no explanations on the arguments, returns and on what the methods do
  2. Only design considerations and backgrounds - little that would help with actual programming
  3. Stuff missing the python module has (e.g. create_menu_from_desktop)
  4. 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.

share|improve this question
Links 1 and 3 don't work. – Matt Joiner Dec 11 '13 at 16:29
... anymore ... – con-f-use Dec 11 '13 at 16:53
up vote 7 down vote accepted

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.

share|improve this answer
That about answers it. Thanks for taking the time. Why not docstrings or doxygen in the first place? – con-f-use Jun 3 '11 at 15:37
We're using gtk-doc. Basically the same thing. But it doesn't yet transfer through to the bindings. – Ted Gould Jun 3 '11 at 15:44
Is there a way to manipulate the menu items created with build_menu_from_desktop(), i.e changing their labels? – con-f-use Jun 3 '11 at 15:48
You could get the menu and change them there, but I'd not recommend that. If they need to be different, I'd just build the menu the normal way... Really the function is only intended to be a helper in the case you want them to be the same. – Ted Gould Jun 3 '11 at 16:08
Just wanted to check if there're any updates on Giraffe and qucklists... – con-f-use May 8 '12 at 13:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.