Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!ames!sgi!shinobu!odin!krypton!gavin From: gavin@krypton.sgi.com (Gavin A. Bell) Newsgroups: comp.sys.sgi Subject: Re: something I noticed the other day Message-ID: <8957@odin.corp.sgi.com> Date: 14 Jun 90 18:19:45 GMT References: <5159@uceng.UC.EDU> Sender: news@odin.corp.sgi.com Lines: 34 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@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@sgi.com, (415)335-1024)