mate-desktop / mate-panel

MATE panel
https://mate-desktop.org
GNU General Public License v2.0
184 stars 115 forks source link

Is there documentation about writing a panel applet? #29

Closed william8000 closed 12 years ago

william8000 commented 12 years ago

I used gnome2 under old versions of Fedora, and when I upgraded to Fedora 17, I switched to mate. The brightness applet never worked in gnome2, but I discovered that I could set the brightness by writing a number to a file a few levels under /sys/devices/virtual, and I made a simple gnome2 panel applet to do that. I have the same problem with the brightness applet in mate. It stick at 100% and won't let me move the slider.

I am trying to convert my applet to mate 1.3.0. It looks like libmatepanelapplet-2.0 is similar to gnome2 except for prefixing everything with mate, and I got the C part of the applet to compile and link. I am not sure how to modify the .server file or where to install it. Are there any simple examples or documentation?

I am compiling the applet with gcc pkg-config --cflags --libs libmatepanelapplet-2.0 -o $(NAME) $(NAME).c Will that produce something usable, or must I integrate it into my clone of the mate-panel source tree?

Is the libmatepanelapplet-2.0 interface still supported, or do I have to convert my applet to libmatepanelapplet-3.0?

I also wrote a simple mail checker applet that reads the mail spool file. I can post the source if it would help.

William williambader@hotmail.com

Gymnasiast commented 12 years ago

http://wiki.mate-desktop.org/migrating has some documentation about migrating. It's not just that 'gnome' that needs to be replaced by 'mate', there are more things. Nautilus becomes Caja, orbit becomes corba... On the same page is a script that will change all those strings for you.

william8000 commented 12 years ago

Thanks! I ran my panel applets through the script, and they worked. I have posted them at the link below. One sets the screen brightness (the one in gnome2 didn't work for me either) and the other is a mail checker. http://williambader.com/pat/mate-panel-apps.tar.bz2

adam-a-smith commented 12 years ago

I would like to second the call for documentation on making applets. I'd like to help (as I can) to make Mate great, but it's just not easy to find the information online.

Thanks.