• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Presenting TidyMenus

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:
  • 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)
Some background:

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
TidyMenus should work under any flavor of System 7. (Of course, System 6 doesn’t have a Help menu [and the ‘Color’ menu only appears on color monitors anyway], and I am a System 7 guy so not really intending to support MacOS 8 or 9 here, though if it happens to work, great!)

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

  • TidyMenus.bin
    27.9 KB · Views: 14
Last edited:

Crutch

Well-known member
Ha yeah that makes sense, without the Label menu in MacOS 8, the Special menu ends up getting that ID.

I should just disable the “Hide Label menu” button in System 8+. Will do that in an update soon. Thanks for trying it!
 

Nixontheknight

Well-known member
Ha yeah that makes sense, without the Label menu in MacOS 8, the Special menu ends up getting that ID.

I should just disable the “Hide Label menu” button in System 8+. Will do that in an update soon. Thanks for trying it!
you're welcome
 

Chopsticks

Well-known member
SE/30 with Romintator
i tested the following:

system 7.0.1
System 7.1
System 7.5.5
System 7.6.1

Can Confirm on each system version above this works perfectly, both toggle options also work with no issues, didnt bother testing 8.1 (8.1 is to slow on a stock SE/30 anyways) as im also mostly a system 7 guy too

its nice to get rid of helium and replace it with something lean, so thank you
 

LaPorta

Well-known member
Very nice! Could you write an OS-check portion of code to disable the different IDs based on the system version?
 

tt

Well-known member
Super cool, just tried it under emulation and will install it on my machines. Thanks!
 

Crutch

Well-known member
Thanks @Nixontheknight @LaPorta for the feedback: this small update should nicely disable the “Hide Label menu” checkbox in System 8 and above (and will tell you that this only works under System 7).

Also, forgot to mention you can toggle the “Hide Labels” and “Hide Help” checkboxes by just tapping either the L or H (or ‘?’) keys respectively with the Control Panel up.
 

Attachments

  • TidyMenus.bin
    27.9 KB · Views: 5

Nixontheknight

Well-known member
Thanks @Nixontheknight @LaPorta for the feedback: this small update should nicely disable the “Hide Label menu” checkbox in System 8 and above (and will tell you that this only works under System 7).

Also, forgot to mention you can toggle the “Hide Labels” and “Hide Help” checkboxes by just tapping either the L or H (or ‘?’) keys respectively with the Control Panel up.
Keyword should, in my testing on an LC III (I had to hack 8.1 to run on this), and in BasiliskII, it does not disable the hide label menu check box on OS 8.1
 

Crutch

Well-known member
@Nixontheknight it was driving me nuts trying to figure out how my extremely simple code to check for MacOS 8 wasn’t working …. Then I realized I had just re-uploaded the old file again.

This is the right version, would you mind checking on your setup?
 

Attachments

  • TidyMenus.bin
    28 KB · Views: 4

Phipli

Well-known member
@Nixontheknight it was driving me nuts trying to figure out how my extremely simple code to check for MacOS 8 wasn’t working …. Then I realized I had just re-uploaded the old file again.

This is the right version, would you mind checking on your setup?
@Crutch What I've started doing is hosting elsewhere and just linking in posts, as long as I remember.

It means I can either link to "latest" and people coming along later don't pick up an old version, or I can have a page with more info and versions.
 

Crutch

Well-known member
All right, I couldn’t stop myself so went ahead and worked out how to do the MacOS 8 thing and, when they “Hide Label menu” checkbox is selected under System 7, move the Label menu to a hierarchical submenu under the ‘File’ menu* instead of just hiding it entirely. This way the Label menu is always available without taking up space in the menubar. (I guess along with Today’s the Day this is a mini-trend of making little UI features from MacOS 8 available in System 7.) Unlike just entirely hiding the Label menu, this feature requires the INIT to be installed first.

If anyone here wants to give it a try, I would appreciate any feedback. I’ll upload this to the Garden in a few days and call it done!

p.s. there’s a new icon too — rebuild the desktop to see it if you used the old version.

* implementation note: because the Finder’s normal ID for the Label menu is > 255, therefore is out of range for hierarchical menus, this required creating a copy of the Label menu and patching _MenuSelect, _Enable/DisableItem, _CheckItem, and _SetItemMark to trick the Finder into doing whatever it did to the “normal” Label menu to my copy, and vice-versa.
 

Attachments

  • IMG_0162.jpeg
    IMG_0162.jpeg
    2.3 MB · Views: 32
  • TidyMenus.bin
    32.3 KB · Views: 6
Top