Activation

Mikael Hallendal micke@imendio.com
Wed, 07 Jan 2004 17:54:15 +0100


tis 2004-01-06 klockan 00.30 skrev Havoc Pennington:
> On Mon, 2004-01-05 at 13:32, Richard Hult wrote:
> > > * Some hesitation about the usefulness of primary/secondary owner
> > 
> > Are there some known use cases for this? It sounds more useful to
> > actually handle this at the application level, for example with a
> > service that handles all the open windows of an app (instead of having
> > several running instances of the app), and passes around the "primary
> > owner" role as windows of the app are closed and opened.
> > 
> 
> The intended use case is: 
> 
>  - I start three gedit processes, or one gedit and one 
>    kwrite
>  - the first one claims org.freedesktop.TextEditor
>  - I close the first gedit
>  - one of the others becomes the active org.freedesktop.TextEditor
>    automatically, with no race conditions

I don't really get when this would be useful? For example in GNOME I
would set GEdit to be my default editor and if I was running KDE I would
set it to KWrite. So a program that wanted to fire up a text editor
would run 'gedit %s' or something which would look for org.gnome.GEdit
or whatever it might be called.

The other use is to get a texteditor component to embedd but then again
I probably wouldn't want to other programs behaviours depend on which
other programs I might have running at the same time (ie. if I have
KWrite running I get a KWrite embeddable component and if I have GEdit
running I get a GEdit embeddable component).

I'm not sure giving the user different services depending on what he
might be running at the time is a good idea. So I think it would be (at
least in this case) better to try to activate org.gnome.GEdit rather
than a org.freedesktop.TextEditor. Perhaps this makes more sense for
non-gui apps, like org.freedesktop.ConfigDatabase which could give GConf
or some KConf depending on what you have running?

Regards,
  Mikael Hallendal
-- 
Mikael Hallendal               micke@imendio.com
Imendio HB                     http://www.imendio.com
Phone: +46 (0)709 718 918