Questions about creating a new docklet for docky

Asked by James Lorenzen

I would like to create a new docklet for the Continuous Integration tool called Hudson (https://hudson.dev.java.net). It would work just like Weather docklet, but I have a few questions before I get started.

Should this new docklet use the dbus or mono interface?
As I am developing this new docklet, how can I test my changes?

When I originally started writing this for docky1, they told me that all I had to do was drag the mono .dll onto the plugins list in preferences and it would install it. This didn't work for me, so before I get started I'd like to know how to actually test as I write it. Is there a command line utility to install new docklets?

Question information

Language:
English Edit question
Status:
Answered
For:
Docky Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Chris S. (cszikszoy) said :
#1

1) As to which interface to use, that depends on what the intended functionality of the docklet is. The DBus interface is limited to manipulating the icon / badge text, and adding items to the right click menu. With the CLR interface, there are many more possibilities.

2) This depends on which interface you use. If you're using the dbus interface, you just run the program. All of the Helpers are run out of process, all docky does is start them. If you're using the CLR interface, the easiest thing to do is to branch our source, and add your docklet as a new project in MonoDevelop (under the Standard Plugins project folder). To get you started quickly, just look at the other docklets (both how they use the Docky interfaces and how the build scripts are done) to get a sense of what needs to be done.

If you need more help, feel free to ask in #docky on irc.freenode.net

Revision history for this message
James Lorenzen (jameslorenzen) said :
#2

This Hudson docklet would be just like Gmail or Weather. I would need to manipulate the icon and badge text and eventually have right click menu options. But it would also need a background thread to poll the hudson servers for status much like the Gmail or Weather docklets have to poll for new email or updated weather information.

So from what it sounds like, I could use the DBus interface.

Could you give me some examples of what the existing docklets use? For example, does Weather use CLR, dbus, or both?

Revision history for this message
Robert Dyer (psybers) said :
#3

Well if I am understanding this Hudson correctly, then you probably would not want a 'launcher' for Hudson? If that is the case you want the CLR plugins, not DBus.

DBus plugins take existing launchers/icons on the dock and manipulate them. The CLR plugins can ADD icons to the dock (and they dont have to be launchers). The CLR plugins can do anything the DBus ones can and more.

Weather/GMail are both CLR. An easy way to figure out the difference is all the DBus helpers are called 'helpers' and have a tab in the prefs dialog. All the CLR plugins are 'docklets' and must be specifically assigned to 1 dock.

Revision history for this message
Robert Dyer (psybers) said :
#4

Just to clarify, everything listed on the 'Docklets' tab of the settings dialog is a CLR plugin. Everything listed on the 'Helpers' tab of the settings dialog is a DBus extension.

Can you help with this problem?

Provide an answer of your own, or ask James Lorenzen for more information if necessary.

To post a message you must log in.