-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.386 $ $NHDT-Date: 1607754748 2020/12/12 06:32:28 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.390 $ $NHDT-Date: 1607895902 2020/12/13 21:45:02 $
General Fixes and Modified Features
-----------------------------------
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
+Qt+OSX: suppress unwanted "Search [______]" action from being inserted as the
+ first entry in the menubar's "Help" dropdown menu
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
its own menu bar) and then back to nethack (thereby reloading nethack's
menu bar).
-On OSX, a "Search [______]" action is inserted as the first entry of
-the dropdown Help menu on the toolbar. NetHack has no control over
-what it does or where it looks, so it should be eliminated somehow.
-(It is not releated to nethack's search command, nor the interception
-of an attempt to insert "Search" into the dropdown Action menu.)
-
Sometimes scrolling a menu leaves the displayed text not matching what
nethack thinks is displayed, so making a selection by mouse click may
occasionally pick the wrong item. There's usually a visual clue when
info->setTitle("Info");
menubar->addMenu(info);
menubar->addSeparator();
+#ifndef MACOSX
help->setTitle("Help");
+#else
+ // On OSX, an entry in the menubar called "Help" will get an
+ // extra action, "Search [______]", inserted as the first entry.
+ // We have no control over what it does and don't want it.
+ //
+ // Using actions() to fetch a list of all entries doesn't find it,
+ // so we don't have its widget pointer to pass to removeAction().
+ //
+ // Altering the name with an invisible character to inhibit
+ // string matching is ludicrous but keeps the unwanted action
+ // from getting inserted into the "Help" menu behind our back.
+ // Underscore works too and is more robust but unless we prepend
+ // it to every entry, "_Help" would stand out as strange.
+ help->setTitle("\177Help");
+ // (Renaming back to "Help" after the fact does reset the menu's
+ // name but it also results in the Search action being added.
+ // Perhaps a custom context menu that changes its name to "Help"
+ // as it is being shown--and possibly changes back afterward--
+ // would work but the name mangling hack is much simpler.)
+#endif
menubar->addMenu(help);
}