Problems with a helper I'm writing

Asked by Felipe Morales

I'm writing a helper to control MPD (the music player daemon, http://mpd.wikia.com/), but I'm having some trouble.

The helper source can be downloaded from http://dl.dropbox.com/u/815025/docky-mpdhelper.py

It requires python-mpd and mpd.

The problem is, somehow the menu_pressed function in my DockManagerItem subclass only works once. The helper seems to load fine, and works partially (i have a timeout function updating the tooltip when the song changes), but the following happens:
1) the helper loads
2) i press a menu item
3) the action works (e.g., i press "Next", the mpd client plays the next song in the playlist)
4) i press some other menu item
5) nothing happens.

As a side effect, the same problem appears in all other helpers menu items until I restart the application. I don't know what causes all this.

My guesses are:
1) there is either a threading problem in my code, caused by the timeout function (most likely), or
2) there is (somehow) an incompatibility between python-mpd and python-dockmanager

I saw (http://wiki.go-docky.com/index.php?title=Writing_Helpers) Docky adds a x-docky-uses-timeout capability to DockItem. Can that be related?

Question information

Language:
English Edit question
Status:
Solved
For:
Docky Edit question
Assignee:
No assignee Edit question
Solved by:
Felipe Morales
Solved:
Last query:
Last reply:
Revision history for this message
Felipe Morales (hel-sheep) said :
#1

This seems to have been the effect of bug 596969 (https://bugs.launchpad.net/docky/+bug/586969).
I confirm it's fixed in rev 1392.

As an aside, how can I propose my helper's inclusion in Docky's codebase?