zazula@uazhe0.physics.arizona.edu (RALPH ZAZULA) (03/06/91)
Well, more than once I've managed to hit Quit for Terminal when I meant
to hit Quit for something else. And more than once I had some kind of
a compile, TeX or file transfer going on at the time! So I mentioned
it to Drew Davidson (our UofA campus Rep) and said "boy it'd be nice
to have a "really wanna quit?" window in Terminal... Well, this is
what we (mostly Drew) came up with:
You need to have NibEdit (a great program!) to do this...
(I'm using NS 2.0 also...)
o copy /NextApps/Terminal to some local area
o run NibEdit extract on it 'extract Terminal'
o run Interface Builder
o go to File->Open Terminal.nib
o go to Tools->Inspector (open inspector panel)
o get yourself a panel from 'Palletes'
o give it a name if you like (eg. Terminal Quit)
do this and other naming via Inspector Attributes
o move some text into it if you like (eg. Title: Terminal Angst,
Text: Do you _really_ want to quit?) (_ = squashed box)
o move two buttons into it
o name one 'No' the other 'Yes'
o Change the inspector panel to Connections
o select the 'quit' option from the Terminal menu
o un-connect it from 'terminate' via the inspector panel
o re-connect it to the panel (Ctrl-mouse) and select as
it's target NakeKeyAndOrderFront
o connect 'No' button to the panel (CTRL-Mouse) and make it's
target OrderOut
o connect 'Yes' button to files owner (in the ICONS window)
and make it's target terminate
o add a NXReturn icon to the Yes button
o test the interface, when you hit quit (or Command-q) the
panel you made should pop up. NO should not exit, YES
(or Return) should.
o go back and add any funky text you want to the panel.
o save your work
o exit IB
o use NibEdit combine to put it back together
'combine Terminal TerminalNew'
o copy /NextApps/Terminal to /NextApps/Terminal{Old,Org...whatever}
o move/copy TerminalNew to /NextApps/Terminal
That should do it! Have fun and thanks Drew!
Ralph
|----------------------------------------------------------------------|
| Ralph Zazula "Computer Addict!" |
| University of Arizona --- Department of Physics |
| UAZHEP::ZAZULA (DecNet/HEPNet) |
| zazula@uazhe0.physics.arizona.edu (Internet) |
|----------------------------------------------------------------------|
| "You can twist perceptions, reality won't budge." - Neil Peart |
|----------------------------------------------------------------------|