Ensuring one instance of each application
- From: Havoc Pennington <hp redhat com>
- To: "James M. Cape" <jcape jcinteractive com>
- cc: GUI List <gnome-gui-list gnome org>, gnome-devel-list gnome org
- Subject: Ensuring one instance of each application
- Date: Fri, 19 Nov 1999 23:24:53 -0500 (EST)
On Sat, 20 Nov 1999, James M. Cape wrote:
>
> IMHO, the solution here is to make all the apps play nice and prompt the
> user if he/she tries to fire up more than one instance. What all this
> entails is up to the app authors, but coding this into gnome-libs would
> probably be a good thing.
>
This is actually a pretty trivial patch to any GNOME application, and will
be even easier in GNOME 2.0. All you do is make your application register
itself with the new OAF (object activation framework) library. OAF keeps a
list of all the running CORBA objects, by name. Then apps check on startup
to see if another instance is already running (the old GOAD library had
this feature, I assume OAF will also have it). If another instance is
running you either just exit, or you send it a CORBA command asking it to
raise itself or open a document passed on the command line or whatever is
appropriate for the application. For some applications you may even want
multiple instances, so those just wouldn't do this.
This would really be a snazzy feature, people would notice.
Red Hat 6.1 comes with a gtcd patched to do this, since it sometimes
starts up a gtcd automatically when you insert a CD. The patch doesn't
seem to be in CVS though, I don't remember why.
The only problem I see is that right now there isn't a good way to say
"raise and focus my application" that will always work (if the user's on a
different desktop, etc.) There could also be problems with multiple X
servers. These are both reasonably easy to solve though.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]