My first plugin

James Westby jw+xfce at
Tue Aug 15 01:43:35 CEST 2006

On (14/08/06 02:13), Bruno Jesus wrote:
> Yesterday I've spent some hours trying to make a plugin work, i've
> learned some gtk/gdk but as I know nothing about makefiles I've built
> it under the clock plugin (it uses the clock_constructor because if I
> change it's name, it will not compile anymore, I really don't know
> why). It's a simple network state plugin, it reads /proc/net/dev,
> looks for eth0 and shows in 5 images it's state (unredable,no
> transmission,tx,rx,txrx).
> Can anyone help me doing a makefile for it? I've attached a .tar.gz
> with everything necessary to make it run (I hope). I'm almost sure it
> only runs on linux boxes because of how I read data from /proc. I also
> know I've used bad programming techniques (like hard-linking the
> images) but as I said, it's my first plugin =)

is something that you can work with. 

I took the liberty of moving things around and changing the code to make
it fit in with the panel plugin scheme better. There is still plenty to
do though.

If you untar, and the run xdt-autogen in the directory you will have the
stuff ready for a ./configure etc.. run.

Currently the code to actually do the detection is commented out, as I
couldn't compile with it in.

I suggest that you look in to using ioctls to get the information that
you want, it will be a cleaner interface. However you can just stick to
the parsing if you want.

Please reply to the list if you have any more questions.


More information about the Xfce4-dev mailing list