Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the newest way to develop gnome panel applets (using python)

Today I've switched to GNOME (from XFCE) and found some of the cool stuff missing and I would like to (try to) do them on my own. I tried to find information on how to develop Gnome applets (items you place within the panel) and most likely in Python, but it's not a hard limitation.

I found the article 'Gnome applets with Python', but it seems quite old (2004). The first thing mentioned there is bonobo (whatever it is), but Gnome page on Bonobo discourages it.

Gnome site has a page on applet development, but this one is even older (2003) and incomplete (lot of fixme write).

What is the current approach then? I wouldn't want to learn something outdated.

like image 747
Grzegorz Oledzki Avatar asked Jan 09 '10 20:01

Grzegorz Oledzki


2 Answers

Theres an article called Gnome Panel Applets in Python from 2008 on the Ubuntu forums that may help with this.

This includes defining a bonobo component. This Gnome documentation on applet development states that

Technically, applets are Bonobo controls embedded in the Gnome panel

So it looks like that is the correct way to go.

like image 107
Robert Christie Avatar answered Oct 01 '22 18:10

Robert Christie


In case anyone else comes across this question, in the forum post linked in Robert Christie's answer a user pointed out that simply using gtk.StatusIcon() is a more portable solution if you're just looking for tray icon functionality (as opposed to say a clock, or main menu applet). Additionally, if you think you need bonobo you should probably be using D-Bus anyways.

like image 26
Leaird WEdd Avatar answered Oct 01 '22 19:10

Leaird WEdd