Qt menu fixes: mainly Quit

Changes affecting everybody (using Qt):  rename game->Save to
game->Save-and-exit and game->Quit to game->Quit-without-saving.

OSX-specific changes:  add separate nethack->Quit and change
game->Quit-without-saving to game->_Quit-without-saving to prevent
that from being hijacked for the nethack menu.  nethack->Quit menu
entry works.  Command+Q is a keyboard shortcut for it.  They bring
up a menu with choices of "Quit without saving" and "Cancel and
return to game".  It's not the same as the handler for the window
Close button, which used to offer "Save" or "Cancel" (with the
latter triggering an infinite loop) but now offers "Save and exit"
or "Quit without saving".  They don't share any code.  The
game->_Quit-without-saving entry doesn't work; it runs nethack's '?'
command like a bunch of other broken menu entries.  If it did work,
it would give nethack's "Really quit?" prompt and proceed from there.
The "Quit without saving" response for nethack->Quit confirmation
bypasses that and just quits.

Also OSX, add a second 'about' entry.  The first one is hijacked and
added to the nethack menu, the second is help->_About_Qt_NetHack_
and avoids hijacking.  Both nethack->About and help->_About_ bring
up the same dialog box showing version and assorted other info.

A lot of flailing about with for relatively small amount of progress.
This commit is contained in:
PatR
2020-08-09 14:55:05 -07:00
parent 251fd5c0f7
commit a87a83fc83
3 changed files with 91 additions and 26 deletions

View File

@@ -1,4 +1,4 @@
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.278 $ $NHDT-Date: 1596936095 2020/08/09 01:21:35 $
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.279 $ $NHDT-Date: 1597010101 2020/08/09 21:55:01 $
General Fixes and Modified Features
-----------------------------------
@@ -362,10 +362,19 @@ Qt: clicking on the window's Close button brought up a dialog offering
with no opportunity to try to back out of the Close operation
Qt: add 3.6 status fields Stone, Slime, Strngl, Deaf, Lev, Fly, Ride
Qt: add Attributes, Overview, and Annotate to the "Info" pull down menu
Qt: rename menu entries game->Save to game->Save-and-exit and game->Quit
to game->Quit-without-saving
Qt+QSX: fix control key
Qt+OSX: rename menu entry "nethack->Preferences..." for invoking nethack's
'O' command to "Game->Run-time options" and entry "Game->Qt settings"
for making persistent Qt customizations to "nethack->Preferences..."
Qt+OSX: prevent game->Quit-without-saving from being hijacked for the nethack
menu by renaming it game->_Quit-without-saving (OSX only)
Qt+OSX: add a separate nethack->Quit menu entry with different functionality;
Command+Q invokes it
Qt+OSX: since menu entry help->"About Qt NetHack" gets hijacked and becomes
"nethack->About nethack", add a separate help->_About_Qt_NetHack_
which stays where intended and brings up the same information
tiles: add indicator of thonged portion to aklys tile
tty: role and race selection menus weren't filtering out potential choices
which got excluded by OPTIONS=align:!lawful or !neutral or !chaotic