Re: patches for a unique CD player app



Hi Owen,

On Sat, 2002-08-24 at 01:23, Owen Taylor wrote:
>   --unique                               Only start if there isn't already a
>                                          CD player application running

	Trivially detected using bonobo-activation,

>   --play                                 Play the CD on startup

	And trivially passed to the server by stealing the code from
gnome-terminal that does essentially this already. I'd like to make this
a standard feature of libbonobo[ui] in Gnome 2.2.

> But before I tried to tweak it to perfect, I wanted to get a general
> reaction to doing this via X properties rather than Bonobo.

	Clearly it's nice to have the user feature.

> The reasons I didn't use Bonobo are:
> 
>  - I don't know much about Bonobo; I know a lot about X selections.

	This is just tragic; given the fairly traditional antipathy towards
bonobo from North Carolina ;-) it would be nice if you could try and use
it - just once.

>  - Bonobo seemed more complex, since I'd need to install IDL files,
>    server files, etc. For this simple case, it really seems
>    like overkill. It's not full IPC, it's just a form of locking.

	Not at all; re-use the existing interfaces; eg. the terminal uses the
EventSource / Listener interface for argument parsing, and the
bonobo-activation-server code can be used to see if anything's running.
In fact you wouldn't have to use a single non-C wrapped method.

>  - I wasn't sure that the right semantics were possible. It isn't
>    a "unique application"; the behavior of:
> 
>     gnome-cd --unique
> 
>    Depends on whether there are zero cd players or one or more 
>    cd players running currently; it's perfectly
>    legitimate to have both the cd-player applet and gnome-cd
>    running at the same time.

	I don't see that as a problem.

>    It also is explicitely per-display, not per-user, per-home-dir,
>    or whatever.

	Hmm; is the per-display-ness a feature ? or is that just how it works ?
clearly b-a-s will do per-display stuff for you just fine; but it will
be unique per user+machine combo. Then again - the device is most
definately tied to the machine - so doing it per display may result in
some odd edge cases.

> If non-Bonobo isn't acceptable, I don't expect to have the time
> to rewrite it using Bonobo, but it's really the behavior I
> care about, not the implementation mechanism

	I care about the behavior too - and clearly I can see that doing this
with X properties is easier for you, it just saddens me a tad.

	Any chance you could look at the 30 lines of code in
profterm/src/terminal.c that does this for profterm ? any feedback on
the approach most welcome,

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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