Re: How to detect if the gnome 2 panel is runing.

On Sat, 27 Jul 2002, Jonas Aaberg wrote:

> I found out a way to detect if the applet is executed by the
> panel or not,
> The commandline arguments when you execute an applet from the panel, 
> are(includes?):
> --oaf-activate-iid=<applet factory name>
> --oaf-ior-fd=<some number>

That is just a side effect of being executed from the panel, not proof of 
it (any object that is activated by OAF in any way will have those cmdline 

You can do the equivalent of the GOAD call using the oaf_activate function
with the right query (and passing OAF_FLAG_EXISTING_ONLY). But honestly,
it is pretty broken to try to detect a running panel... Some programs are
never intended to be run by users from the command line, and applets are
among them. If you need to start an applet from the command line, use
oaf-client instead.

-- Elliot
Sometimes when I get up in the morning, I feel very peculiar.  I feel like
I've just got to bite a cat!  I feel like if I don't bite a cat before
sundown, I'll go crazy!  But then I just take a deep breath and forget
about it.  That's what is known as real maturity.	-- Snoopy

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