Re: Milestones document




On Mon, 6 Dec 1999, Derek Simkowiak wrote:
> 
> 	Perhaps we could use a command-line argument to gnome-terminal to
> have it check if there's an existing terminal running, and if so, spawn
> another window (and if not, just lauch the program normally).
> 

Just add this to gnome-terminal:

 GNOME_Terminal term = look_for_per_display_server_by_id("GnomeTerminal/1.0");

if (!CORBA_Object_is_nil(term))
 {
   GNOME_Terminal_new_term(term, cmdline_args);
   exit(0);
 }

where look_for_per_display_server_by_id() is either a GOAD or OAF call,
depending on gnome-libs version.

GNOME_Terminal_new_term() would instruct the existing terminal process to
open a new terminal window. 

Alternatively, you could do this only if a command line option like
--find-existing is provided, then the panel launcher would use this
option, so users would save RAM by default.

All applications that want to avoid multiple instances should probably do
this. Owen says that the control center has code to focus a window and
yank it on to the current desktop, say if the document on the command line
is already open.

Havoc



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