Re: panel applet from shell



On 3/09/2003 7:22 AM, Jacob Gladish wrote:

I'm working on a very simple gnome2 panel applet, and am having lots of
difficulty. I basically have two questions.

First, is there a way to launch an applet from a shell? Everytime I try,
the process runs, but never does anything useful. I've tried different
args like --oaf-private and --sm-disable with no affect. I thought it
might be having difficulty with the orb since other applets running seem
to have a file descriptor to work with. That's why I thougt the
--oaf-private may have some affect. The --sm-disable was pretty much in
desperation.

Starting your applet's executable will not put the applet on the panel. Instead it registers the factory for your applet with the activation server. If you then request that the panel put an instance of your applet on the panel (through the "add to panel" menu), it will ask the factory to create the instance. Usually the factory wouldn't be running, so the panel would ask the activation server to start the factory first.

Starting the factory manually is useful for debugging purposes though, since it lets you attach a debugger to it easily.

Second, I installed both a .server file under "/usr/lib/bonobo/servers",
and a .xml under /usr/share/gnome-2.0/ui/, and I still don't have an
entry to launch my applet from the context menu by right-clicking the
panel. I have both a panel:category, and panel:icon element in the
server file. Is there a way to turn some tpe of debugging on for the
panel to why there's no entry?
I'm using redhat9, with all stock libs.

You may need to restart the panel. From memory, there are some issues in the 2.2 panel with rereading the applet list. After restarting the panel, it should find your applet. (running "killall gnome-panel" should cause it to restart).

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]