On Tue, 2008-02-05 at 01:36 +0100, Andreas Sliwka wrote:
Greetings, I'm looking for an example on how to create a PanelApplet with vala. Any help would be greatly appreciated.
[snip] Hi Andreas, I've done some panel applets with vala, so here are my experiences. The code it's not so clean because libpanelapplet vapi miss some function call and for other reasons. Instructions: 1) Save all attached files to some directory in your home 2) compile the applet with vala: valac -o vala-applet vala-applet.vala --vapidir ./ --pkg gtk+-2.0 --pkg libpanelapplet-2.0-custom --pkg libbonoboui-2.0 --Xcc="-export-dynamic `pkg-config --cflags --libs libpanelapplet-2.0`" Note the -export-dynamic arguments, the ` around the pkg-config command and the " and (finally) that I've used some private vapis. 3) Adjust the path at the beginning of vala-applet.server to the folder where you just compile the applet 4) Copy the vala-applet.server to /usr/lib/bonobo/servers/ 5) execute the applet from within the folder you just compiled: ./vala-applet 6) Then add the applet to the panel as usual: right click etc etc... The applet is called ValaApplet and should have a green apple pixmap Hope this help. Bye, Andrea P.S. I've tested all with a Debian Sid.
Attachment:
libbonoboui-2.0.vapi
Description: Text document
Attachment:
libpanelapplet-2.0-custom.deps
Description: Text document
Attachment:
libpanelapplet-2.0-custom.vapi
Description: Text Data
Attachment:
vala-applet.server
Description: Text document
Attachment:
vala-applet.vala
Description: Text Data