something I noticed the other day

Gavin A. Bell gavin at krypton.sgi.com
Fri Jun 15 04:19:45 AEST 1990


Tom Rohling asks about the name after the 'Quit' in the window border
popup menu:

>   This is not causing any problems or anything, I don't care what it says
>   when I go to kill the window, I'm just curious where it gets the old
>   file name from all the time, even long after its been changed.

>Just wondering,

>Tom Rohling
>trohling at uceng.uc.edu

The name comes from whatever string you pass to the winopen() (Or WINOPE,
if you are a Fortran dude) call.  You probably want to do something
like:

/* Open with the executable's name (stripped of directory) */
{
	char *t, *strrchr(char *, int);
	winopen((t=strrchr(argv[0], '/')) != NULL ? t+1 : argv[0]);
}

... which will make it do what you expect.

The string passed to winopen() is also used as the title of the window
(if wintitle isn't called to reset it), as the title of the icon, and
as the name to look for in /usr/NeWS/icons or ~/.4sight/icons (see the
winicons manual page for more info).  It is also the string used by
the NeWS makepreference/preforigin functions that decide where to put
a program's window when it is first started up.  At trade shows we
often find it useful to make symbolic links to the same program,
giving each its own position on the screen, to bring up a program at
several different screen locations.
--gavin     (gavin at sgi.com,  (415)335-1024)



More information about the Comp.sys.sgi mailing list