Crutch
Well-known member
I’m happy to share here TidyMenus (a.k.a. NoLabel 2.0), a simple little Control Panel for System 7 that can:
After returning to the vintage Mac hobby a few years ago, one of my first projects was the NoLabel cdev. NoLabel simply allowed hiding the Label menu in the Finder under System 7 — something I always found pretty useless, especially on black-and-white compact Macs. I also like that without the Label menu, the menu bar just reads “File Edit View Special”, as it was meant to do dating back to 1984.
The original NoLabel did something pretty dumb — it patched _InsertMenu and checked the name of the menu being inserted vs. the word “Label” in English. As @8bitbubsy pointed out this summer, of course that doesn’t work for non-English installs. Oops. This was easy enough to fix by just figuring out the Label menu’s ID (the Finder doesn’t use normal menu resources so this took a minute). @8bitbubsy also requested the ability to hide the Help menu — the quite nice vintage Helium extension could do this (by the way, I patched it in 2020 to remove the nagware screen, see https://macintoshgarden.org/apps/helium-211), but it felt silly to have to install a whole separate (bulky) cdev just for this purpose. Adding the ability to hide the Help menu after a restart was easy enough and I did it in about an hour.
Then I started wondering — could I make it possible to show the Help menu again, across all applications, including those already running, without a restart? The answer is yes, though it required about 100x more work and some deep sleuthing inside the Menu Manager to work out how to stash and replace each application’s (possibly-unique) Help menu, regarding which see my partial notes posted here https://68kmla.org/bb/index.php?threads/weird-facts-about-the-menu-manager.45167/. The approach I took, for you fellow Toolbox nerds, is to:
For now I’m posting this to 68kmla only and would love to know if anyone tries it and it works (or more importantly, doesn’t work … so far I’ve tested it under 7.1 and 7.5.5 on a Mac II and in emulation). Please let me know. If it doesn’t crash too badly for anyone it will end up on the Garden Soon.
Commented source code will be released in the fullness of time, whenever I figure out GitHub and a nice way to tie vintage 68k THINK C projects to it.
Thanks for reading.
- Hide/Show the Label menu in the Finder (no installation or restart required, just open the Control Panel and check the box … though of course you’ll want to install it if you want the Label menu hidden permanently)
- Hide/Show the Help menu in all applications (the cdev must be installed normally in the System Folder for this to work, but no restart is required to hide/show the menu once installed)
- Re-show the Help menu across all applications at any time, just by opening the Control Panel and unchecking the box, without restarting (this was the hardest part — Helium can’t do this and to my knowledge nobody else has done it before either)
After returning to the vintage Mac hobby a few years ago, one of my first projects was the NoLabel cdev. NoLabel simply allowed hiding the Label menu in the Finder under System 7 — something I always found pretty useless, especially on black-and-white compact Macs. I also like that without the Label menu, the menu bar just reads “File Edit View Special”, as it was meant to do dating back to 1984.
The original NoLabel did something pretty dumb — it patched _InsertMenu and checked the name of the menu being inserted vs. the word “Label” in English. As @8bitbubsy pointed out this summer, of course that doesn’t work for non-English installs. Oops. This was easy enough to fix by just figuring out the Label menu’s ID (the Finder doesn’t use normal menu resources so this took a minute). @8bitbubsy also requested the ability to hide the Help menu — the quite nice vintage Helium extension could do this (by the way, I patched it in 2020 to remove the nagware screen, see https://macintoshgarden.org/apps/helium-211), but it felt silly to have to install a whole separate (bulky) cdev just for this purpose. Adding the ability to hide the Help menu after a restart was easy enough and I did it in about an hour.
Then I started wondering — could I make it possible to show the Help menu again, across all applications, including those already running, without a restart? The answer is yes, though it required about 100x more work and some deep sleuthing inside the Menu Manager to work out how to stash and replace each application’s (possibly-unique) Help menu, regarding which see my partial notes posted here https://68kmla.org/bb/index.php?threads/weird-facts-about-the-menu-manager.45167/. The approach I took, for you fellow Toolbox nerds, is to:
- Prevent the System’s Help menu from being added to any newly-launched applications by removing it from the undocumented SystemMenuList (and saving a handle to it)
- Hide the front application’s Help menu by hiding it in the “hierarchical” portion of the MenuList
- Patch _HMGetHelpMenuHandle (i.e. really patch _Pack14 and check a selector) to return the appropriate handle (to the system’s, or possibly overridden app-specific, version of the Help menu) when an app asks for it, even if it’s hidden
- Patch _SetMenuBar, _GetMHandle, and _InsertMenu to ensure the Help menu ends up in the right place (hidden or shown) when someone tries to get or add it, and do some other needed housekeeping
- Patch _DrawMenuBar so apply the above to any already-running applications the user switches to after making a change
For now I’m posting this to 68kmla only and would love to know if anyone tries it and it works (or more importantly, doesn’t work … so far I’ve tested it under 7.1 and 7.5.5 on a Mac II and in emulation). Please let me know. If it doesn’t crash too badly for anyone it will end up on the Garden Soon.
Commented source code will be released in the fullness of time, whenever I figure out GitHub and a nice way to tie vintage 68k THINK C projects to it.
Thanks for reading.
Attachments
Last edited: