Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!umich!ox.com!math.fu-berlin.de!unidui!hm292hu From: hm292hu@unidui.uni-duisburg.de (Fred Hucht) Newsgroups: comp.sys.mac.programmer Subject: Re: Modifying 7.0 finder menus: The solution Message-ID: <1991May25.195323.5809@unidui.uni-duisburg.de> Date: 25 May 91 19:53:23 GMT References: <9105251550.AA03580@enuxha.eas.asu.edu> Organization: Rechenzentrum Uni-Duisburg Lines: 91 Maybe you didn't find the following message in comp.sys.mac.didgest It describes the way to change the finder menus. I have tried it and it works fine. Thanks to ALF... Fred Hucht, University of Duisburg, Germany From comp.sys.mac.digest Sat May 25 21:42:31 1991 Date: Thu, 23 May 91 15:46:14 SDT From: "Alexander Falk (ALF)" Subject: Customizing the System 7.0 Finder The new Finder for System 7.0 has indeed been completely rewritten (in C++) and this is the very reason why none of the old ways to customize the Finder with ResEdit work anymore. There are, however, a couple of things you can actually do with ResEdit in the new Finder, too. The menus are stored in resources of type 'fmnu' (they include quite a bit more information than would fit in the regular 'MENU' resource type) and here is how you can edit them: Use ResEdit (preferrably 2.1, but it should also work with older versions) to modify the ResEdit Preferences file (in the Preferences folder inside your System Folder) by adding a new resource of type 'TMPL'. Create 15 new fields in the list and enter the following values for "Label" and "Type": Label Type Comment Visible DWRD 1=Menu is visible in Menubar; 0=invisible Item Count DWRD the number of items in the menu plus 1 ??? DWRD ??? Menu Number DWRD the resource ID of the 'fmnu' ??? DWRD ??? ??? DWRD ??? Title ESTR title of menu (padded to an even length) ***** LSTB begin of item list AppleEvent TNAM corresponding AppleEvent for this item ??? DBYT ??? ??? DBYT ??? Cmd Key CHAR keyboard equivalent of command ??? DBYT ??? Item Text ESTR text of item ***** LSTE end of item list Please note, that a "???" indicates, that I simply don't know what these fields contain (maybe they will one day be documented by Apple). Once you've entered this list, close the 'TMPL' resource you've just created and change it's name to 'fmnu' (using the "Get Resource Info" command). Finally close and save the preferences file. You are now ready to edit the Finder's menus! There is, however, one tricky thing to actually do this: you have to create a duplicate of the Finder, edit the copy, and finally replace it in the System Folder and reboot. While the above technique will actually give you the same freedom of customization that you already had in the 6.0.x days, there is lots more you can do with the new 'fmnu' resources: 1) The 'fmnu' resource type is NOT position-dependent anymore! This means that you can actually completely REARRANGE the menus in the Finder. All you need to do is make sure that you copy all the information stored in the various fields of an item to it's new destination (copy/paste can be a lot of help here!). You can even create your own menu and move commands from other menus to the new one! 2) If you find yourself getting annoyed by the fact that you always have to go through a lengthy duplicate/edit-the-copy/replace/reboot sequence to try out a new variation, the following might be a tip for you: you can actually add a "Quit" command to the Finder! Here is how: Open the "File" 'fmnu' and add 2 to the number of menu items (Item Count); Copy a separation line and append it to the end of the menu; Create another new item at the end of the menu; For this last item put 'quit' in the AppleEvent field, -127 in the next field (the one labeled ???), and finally "Quit" in the item text field. What this actually does is tell the Finder to send a "quit" AppleEvent to itself every time you choose that command from the menu. If you now want to customize the Finder, life is suddenly easy: just launch ResEdit; switch to the Finder; Quit from the Finder (doesn't that sound weird?!); edit the Finder from within ResEdit; Quit from ResEdit (once you quit the last running application the Mac will relaunch the Finder); voila - you are back in the Finder and didn't even have to reboot in order to see your newly customized Finder. By the way, all the above assumes that you know how to use ResEdit. If you don't, please don't attempt this, as it might damage your Finder. Which reminds me: it is always a wise idea to keep a backup of your original Finder (just in case something goes wrong....). I will post more Finder customization tips as soon as I understand the other new resource types..... Happy Seven-Oh-ing, (A) (L) exander (F) alk