Changeset 850
- Timestamp:
- 04/28/08 19:02:43 (4 months ago)
- Files:
-
- trunk/src/main-crb.c (modified) (32 diffs)
- trunk/src/osx/English.lproj/main.nib/classes.nib (modified) (1 diff)
- trunk/src/osx/English.lproj/main.nib/info.nib (modified) (1 diff)
- trunk/src/osx/English.lproj/main.nib/objects.xib (modified) (15 diffs)
- trunk/src/osx/osx_tables.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main-crb.c
r824 r850 363 363 364 364 /* 365 * A mutable array for Recent Items 366 */ 367 CFMutableArrayRef recentItemsArrayRef = NULL; 368 369 /* 365 370 * Support the improved game command handling 366 371 */ … … 385 390 * First heirarchical call, find and initialize all menu IDs. 386 391 * Subsequent misses will attempt to update the menuRefs array. 387 * This will work for any depth heirarchy, so long as child menus have388 * higher IDs than their parents.392 * This will work for any depth heirarchy, so long as child menus have 393 * higher IDs than their parents. 389 394 * 390 395 * Invariant: all MenuRefs with ID < MenuID(tmp) have been initialized. … … 544 549 } 545 550 else { 546 const ATSUAttributeTag itags[] = { kATSUCGContextTag,551 const ATSUAttributeTag itags[] = { kATSUCGContextTag, 547 552 kATSUImposeWidthTag }; 548 553 Fixed advance = (1<<16)*(td->tile_wid - td->font_wid); … … 2213 2218 2214 2219 /* 2220 * Save the recent items array - directly. 2221 */ 2222 CFPreferencesSetAppValue( 2223 CFSTR("recent_items"), 2224 recentItemsArrayRef, 2225 kCFPreferencesCurrentApplication); 2226 2227 /* 2215 2228 * Make sure preferences are persistent 2216 2229 */ … … 2322 2335 2323 2336 load_pref_short(format("term%d.mapped", i), &td->mapped); 2337 CheckMenuItem(MyGetMenuHandle(kWindowMenu), kAngbandTerm+i, td->mapped); 2324 2338 2325 2339 load_pref_short(format("term%d.tile_wid", i), &td->tile_wid); … … 2345 2359 } 2346 2360 } 2361 2362 /* 2363 * Load the recent items array, if present, directly 2364 */ 2365 CFArrayRef recentItemsLoaded = (CFArrayRef)CFPreferencesCopyAppValue( 2366 CFSTR("recent_items"), 2367 kCFPreferencesCurrentApplication); 2368 if (recentItemsLoaded != NULL) 2369 recentItemsArrayRef = CFArrayCreateMutableCopy(kCFAllocatorDefault, 0, recentItemsLoaded); 2347 2370 } 2348 2371 … … 2452 2475 /* Main window */ 2453 2476 Term_activate(td->t); 2477 } 2478 2479 2480 /* Set up the contents of the about dialog */ 2481 static void init_aboutdialogcontent() 2482 { 2483 HIViewRef aboutDialogViewRef; 2484 OSStatus err; 2485 2486 /* Set the application name from the constants set in defines.h */ 2487 char *applicationName = format("%s %s", VERSION_NAME, VERSION_STRING); 2488 CFStringRef cfstr_applicationName = CFStringCreateWithBytes(NULL, (byte *)applicationName, 2489 strlen(applicationName), kCFStringEncodingASCII, false); 2490 HIViewFindByID(HIViewGetRoot(aboutDialog), aboutDialogName, &aboutDialogViewRef); 2491 HIViewSetText(aboutDialogViewRef, cfstr_applicationName); 2492 2493 /* Set the application copyright as set up in variable.c */ 2494 HIViewFindByID(HIViewGetRoot(aboutDialog), aboutDialogCopyright, &aboutDialogViewRef); 2495 CFStringRef cfstr_applicationCopyright = CFStringCreateWithBytes(NULL, (byte *)copyright, 2496 strlen(copyright), kCFStringEncodingASCII, false); 2497 HIViewSetText(aboutDialogViewRef, cfstr_applicationCopyright); 2498 2499 /* Use a small font for the copyright text */ 2500 TXNObject txnObject = HITextViewGetTXNObject(aboutDialogViewRef); 2501 TXNTypeAttributes typeAttr[1]; 2502 typeAttr[0].tag = kTXNQDFontSizeAttribute; 2503 typeAttr[0].size = kTXNFontSizeAttributeSize; 2504 typeAttr[0].data.dataValue = FloatToFixed(10); 2505 err = TXNSetTypeAttributes(txnObject, 1, typeAttr, kTXNStartOffset, kTXNEndOffset); 2506 2507 /* Get the application icon and draw it */ 2508 ProcessSerialNumber psn = { 0, kCurrentProcess }; 2509 ControlRef iconControl; 2510 FSRef ref; 2511 FSSpec appSpec; 2512 IconRef iconRef; 2513 ControlButtonContentInfo cInfo; 2514 2515 err = GetProcessBundleLocation(&psn, &ref); 2516 if(err == noErr) 2517 err = FSGetCatalogInfo(&ref, kFSCatInfoNone, NULL, NULL, &appSpec, NULL); 2518 if( err == noErr ) 2519 err = GetIconRefFromFile((const FSSpec *)&appSpec, &iconRef, nil); 2520 if(err == noErr) 2521 err = GetControlByID(aboutDialog, &aboutDialogIcon, &iconControl); 2522 if( err == noErr ) 2523 { 2524 cInfo.contentType = kControlContentIconRef; 2525 cInfo.u.iconRef = iconRef; 2526 err = SetControlData(iconControl, 0, kControlIconContentTag, sizeof(cInfo), (Ptr)&cInfo); 2527 } 2454 2528 } 2455 2529 … … 2588 2662 quit("Cannot prepare menu bar!"); 2589 2663 2664 /* Load the about dialog and set its contents */ 2590 2665 (void) CreateWindowFromNib(nib, CFSTR("DLOG:about"), &aboutDialog); 2666 init_aboutdialogcontent(); 2591 2667 2592 2668 DisposeNibReference(nib); … … 2670 2746 MenuHandle m; 2671 2747 2672 if( game_in_progress) {2748 if(cmd.command != CMD_NULL) { 2673 2749 EnableAllMenuItems(MyGetMenuHandle(kSpecialMenu)); 2674 2750 EnableAllMenuItems(MyGetMenuHandle(kStyleMenu)); … … 2692 2768 2693 2769 m = MyGetMenuHandle(kFileMenu); 2694 if(inkey_flag && character_generated) { 2770 if(inkey_flag && character_generated) 2771 { 2695 2772 EnableMenuItem(MyGetMenuHandle(kFileMenu), kSave); 2696 2773 } 2697 else { 2774 else 2775 { 2698 2776 DisableMenuItem(MyGetMenuHandle(kFileMenu), kSave); 2699 }2700 for(int i = kNew; i <= kImport; i++) {2701 if(cmd.command == CMD_NULL)2702 EnableMenuItem(MyGetMenuHandle(kFileMenu), i);2703 else2704 DisableMenuItem(MyGetMenuHandle(kFileMenu), i);2705 2777 } 2706 2778 … … 2709 2781 CheckMenuItem(m, toggle_defs[i].menuItem, *(toggle_defs[i].var)); 2710 2782 } 2783 2784 /* Populate the recent items menu */ 2785 DeleteMenuItems(MyGetMenuHandle(kOpenRecentMenu), 1, CountMenuItems(MyGetMenuHandle(kOpenRecentMenu))); 2786 if (!recentItemsArrayRef || CFArrayGetCount(recentItemsArrayRef) == 0) 2787 { 2788 AppendMenuItemTextWithCFString(MyGetMenuHandle(kOpenRecentMenu), CFSTR("No recent items"), kMenuItemAttrDisabled, kOpenRecentMenu, NULL); 2789 } 2790 else 2791 { 2792 for (int i = 0; i < CFArrayGetCount(recentItemsArrayRef); i++) 2793 { 2794 OSErr err; 2795 FSRef recentFileRef; 2796 CFDataRef recentFileData; 2797 Boolean updateAlias = FALSE; 2798 2799 recentFileData = CFArrayGetValueAtIndex(recentItemsArrayRef, i); 2800 if (CFDataGetTypeID() != CFGetTypeID(recentFileData)) continue; 2801 AliasHandle recentFileAlias = (AliasHandle)NewHandle(CFDataGetLength(recentFileData)); 2802 CFDataGetBytes(recentFileData, CFRangeMake(0, CFDataGetLength(recentFileData)), (UInt8 *) *recentFileAlias); 2803 2804 err = FSResolveAlias(NULL, recentFileAlias, &recentFileRef, &updateAlias); 2805 if (err != noErr) continue; 2806 2807 HFSUniStr255 recentFileName; 2808 err = FSGetCatalogInfo(&recentFileRef, kFSCatInfoNone, NULL, &recentFileName, NULL, NULL); 2809 if (err != noErr) continue; 2810 2811 CFStringRef cfstr = CFStringCreateWithCharacters(kCFAllocatorDefault, recentFileName.unicode, recentFileName.length); 2812 AppendMenuItemTextWithCFString(MyGetMenuHandle(kOpenRecentMenu), cfstr, 0, i, NULL); 2813 } 2814 AppendMenuItemTextWithCFString(MyGetMenuHandle(kOpenRecentMenu), CFSTR("-"), kMenuItemAttrSeparator, -1, NULL); 2815 AppendMenuItemTextWithCFString(MyGetMenuHandle(kOpenRecentMenu), CFSTR("Clear menu"), 0, -1, NULL); 2816 } 2711 2817 } 2712 2818 … … 2718 2824 } 2719 2825 2720 2826 /* Add a savefile to the recent items list, or update its existing status */ 2827 static void updateRecentItems(char *savefile) 2828 { 2829 OSErr err; 2830 FSRef recentFileRef; 2831 AliasHandle recentFileAlias; 2832 CFDataRef newRecentFileData; 2833 CFDataRef recentFileData; 2834 2835 /* Convert the save path to an FSRef, then an Alias, and convert to data ready for storage */ 2836 err = FSPathMakeRef((byte *)savefile, &recentFileRef, NULL); 2837 if (err != noErr) return; 2838 err = FSNewAlias(NULL, &recentFileRef, &recentFileAlias); 2839 if (err != noErr) return; 2840 newRecentFileData = CFDataCreate(kCFAllocatorDefault, (UInt8 *) *recentFileAlias, GetHandleSize((Handle)recentFileAlias)); 2841 2842 /* Loop through the recent items array, and delete any matches */ 2843 for (int i = CFArrayGetCount(recentItemsArrayRef) - 1; i >= 0; i--) 2844 { 2845 Boolean updateAlias = FALSE; 2846 char recentFilePath[1024]; 2847 2848 /* Retrieve the recent item, resolve the alias, and extract a path */ 2849 recentFileData = CFArrayGetValueAtIndex(recentItemsArrayRef, i); 2850 if (CFDataGetTypeID() != CFGetTypeID(recentFileData)) continue; 2851 AliasHandle recentFileAlias = (AliasHandle)NewHandle(CFDataGetLength(recentFileData)); 2852 CFDataGetBytes(recentFileData, CFRangeMake(0, CFDataGetLength(recentFileData)), (UInt8 *) *recentFileAlias); 2853 2854 /* If resolving an alias fails, don't delete it - the array is size-limited 2855 * anyway, and this allows network shares or removeable drives to come back later */ 2856 err = FSResolveAlias(NULL, recentFileAlias, &recentFileRef, &updateAlias); 2857 if (err != noErr) continue; 2858 err = FSRefMakePath(&recentFileRef, (byte *)recentFilePath, 1024); 2859 if (err != noErr) continue; 2860 2861 /* Remove the item from the array if the paths match */ 2862 if (strcmp(recentFilePath, savefile) == 0) 2863 { 2864 CFArrayRemoveValueAtIndex(recentItemsArrayRef, i); 2865 continue; 2866 } 2867 2868 /* If performing a file search via the alias updated it, save changes */ 2869 if (updateAlias) 2870 { 2871 recentFileData = CFDataCreate(kCFAllocatorDefault, (UInt8 *) *recentFileAlias, GetHandleSize((Handle)recentFileAlias)); 2872 CFArraySetValueAtIndex(recentItemsArrayRef, i, newRecentFileData); 2873 } 2874 } 2875 2876 /* Insert the encoded alias at the start of the recent items array */ 2877 CFArrayInsertValueAtIndex(recentItemsArrayRef, 0, newRecentFileData); 2878 2879 /* Limit to ten items */ 2880 if (CFArrayGetCount(recentItemsArrayRef) > 10) 2881 CFArrayRemoveValueAtIndex(recentItemsArrayRef, 10); 2882 } 2883 2884 /* Handle a selection in the recent items menu */ 2885 static OSStatus OpenRecentCommand(EventHandlerCallRef inCallRef, 2886 EventRef inEvent, void *inUserData ) 2887 { 2888 HICommand command; 2889 command.commandID = 0; 2890 GetEventParameter( inEvent, kEventParamDirectObject, typeHICommand, 2891 NULL, sizeof(command), NULL, &command); 2892 2893 /* If the 'Clear menu' command was selected, flush the recent items array */ 2894 if (command.commandID == -1) { 2895 CFArrayRemoveAllValues(recentItemsArrayRef); 2896 2897 /* Otherwise locate the correct filepath and open it. */ 2898 } else { 2899 if (cmd.command != CMD_NULL || command.commandID < 0 || command.commandID >= CFArrayGetCount(recentItemsArrayRef)) 2900 return eventNotHandledErr; 2901 2902 OSErr err; 2903 FSRef recentFileRef; 2904 AliasHandle recentFileAlias; 2905 CFDataRef recentFileData; 2906 Boolean updateAlias = FALSE; 2907 2908 recentFileData = CFArrayGetValueAtIndex(recentItemsArrayRef, command.commandID); 2909 if (CFDataGetTypeID() != CFGetTypeID(recentFileData)) return eventNotHandledErr; 2910 recentFileAlias = (AliasHandle)NewHandle(CFDataGetLength(recentFileData)); 2911 CFDataGetBytes(recentFileData, CFRangeMake(0, CFDataGetLength(recentFileData)), (UInt8 *) *recentFileAlias); 2912 err = FSResolveAlias(NULL, recentFileAlias, &recentFileRef, &updateAlias); 2913 if (err != noErr) return eventNotHandledErr; 2914 err = FSRefMakePath(&recentFileRef, (byte *)savefile, 1024); 2915 if (err != noErr) return eventNotHandledErr; 2916 2917 cmd.command = CMD_LOADFILE; 2918 } 2919 2920 return noErr; 2921 } 2721 2922 2722 2923 static OSStatus AngbandGame(EventHandlerCallRef inCallRef, 2723 2924 EventRef inEvent, void *inUserData ) 2724 2925 { 2725 / / Only enabled options are Fonts, Open/New/Import and Quit.2926 /* Only enabled options are Fonts, Open/New/Import and Quit. */ 2726 2927 DisableAllMenuItems(MyGetMenuHandle(kTileWidMenu)); 2727 2928 DisableAllMenuItems(MyGetMenuHandle(kTileHgtMenu)); … … 2754 2955 { 2755 2956 /* If a game is in progress, do not proceed */ 2756 if ( game_in_progress) return noErr;2957 if (cmd.command != CMD_NULL) return noErr; 2757 2958 2758 2959 /* Let the player to choose savefile */ … … 2762 2963 return noErr; 2763 2964 } 2965 2966 /* Disable the file-handling options in the file menu */ 2967 for(int i = kNew; i <= kImport; i++) 2968 DisableMenuItem(MyGetMenuHandle(kFileMenu), i); 2764 2969 2765 2970 /* Wait for a keypress */ … … 2772 2977 cmd.command = CMD_LOADFILE; 2773 2978 2774 /* Game is in progress */2775 game_in_progress = TRUE;2776 2777 /* Disable the file-handling options in the file menu */2778 for(int i = kNew; i <= kImport; i++)2779 DisableMenuItem(MyGetMenuHandle(kFileMenu), i);2780 2781 2979 return noErr; 2782 2980 } … … 2802 3000 } 2803 3001 } 2804 2805 /* Bit of a hack, we'll do this when we leave the INIT context in future. */3002 3003 /* A game is starting - update status and tracking as appropriate. */ 2806 3004 game_in_progress = TRUE; 2807 3005 term_data *td0 = &data[0]; 3006 ChangeWindowAttributes(td0->w, kWindowNoAttributes, kWindowCloseBoxAttribute); 3007 DisableMenuItem(MyGetMenuHandle(kFileMenu), kClose); 3008 3009 /* Disable the file-handling options in the file menu. 3010 * This has to be done separately for new/open due to messages/prompts 3011 * which may delay open while the menus are still accessibile. */ 3012 for(int i = kNew; i <= kImport; i++) 3013 DisableMenuItem(MyGetMenuHandle(kFileMenu), i); 3014 3015 /* If supplied with a savefile, update the Recent Items list */ 3016 if (savefile[0]) 3017 updateRecentItems(savefile); 3018 2808 3019 return cmd; 2809 3020 } … … 2850 3061 } 2851 3062 CFStringRef tags[] = {CFSTR("Show Fonts"), CFSTR("Hide Fonts")}; 2852 FPShowHideFontPanel();3063 FPShowHideFontPanel(); 2853 3064 SetMenuItemTextWithCFString(command.menu.menuRef, kFonts, 2854 3065 tags[FPIsFontPanelVisible()] ); … … 2877 3088 2878 3089 /* Track the go-away box */ 2879 if (td )3090 if (td && td != &data[0]) 2880 3091 { 2881 3092 /* Not Mapped */ … … 2890 3101 kWindowHideTransitionAction, 2891 3102 NULL); 3103 3104 /* Update the menu status */ 3105 CheckMenuItem(MyGetMenuHandle(kWindowMenu), kAngbandTerm+(td - &data[0]), FALSE); 2892 3106 } 2893 3107 return noErr; … … 3071 3285 SelectWindow(td->w); 3072 3286 3287 /* Update menu states */ 3288 if (td == &data[0] && cmd.command != CMD_NULL) 3289 DisableMenuItem(MyGetMenuHandle(kFileMenu), kClose); 3290 else 3291 EnableMenuItem(MyGetMenuHandle(kFileMenu), kClose); 3292 3073 3293 return noErr; 3074 3294 } … … 3104 3324 kWindowShowTransitionAction, 3105 3325 NULL); 3326 3327 /* Update the menu status */ 3328 CheckMenuItem(MyGetMenuHandle(kWindowMenu), kAngbandTerm+i, TRUE); 3106 3329 3107 3330 term_data_check_font(td); … … 3286 3509 3287 3510 static OSStatus MouseCommand ( EventHandlerCallRef inCallRef, 3288 EventRef inEvent, void *inUserData )3511 EventRef inEvent, void *inUserData ) 3289 3512 { 3290 3513 WindowRef w = 0; … … 3325 3548 3326 3549 static OSStatus KeyboardCommand ( EventHandlerCallRef inCallRef, 3327 EventRef inEvent, void *inUserData )3550 EventRef inEvent, void *inUserData ) 3328 3551 { 3329 3552 … … 3407 3630 3408 3631 static OSStatus PrintCommand(EventHandlerCallRef inCallRef, EventRef inEvent, 3409 void *inUserData )3632 void *inUserData ) 3410 3633 { 3411 3634 mac_warning((const char*) inUserData); … … 3415 3638 /* About angband... */ 3416 3639 static OSStatus AboutCommand(EventHandlerCallRef inCallRef, EventRef inEvent, 3417 void *inUserData )3640 void *inUserData ) 3418 3641 { 3419 3642 HICommand command; … … 3486 3709 3487 3710 /* If a game is in progress, do not proceed */ 3488 if ( game_in_progress) return noErr;3711 if (cmd.command != CMD_NULL) return noErr; 3489 3712 3490 3713 /* Put the direct parameter (a descriptor list) into a docList */ … … 3510 3733 (void)spec_to_path(&myFSS, savefile, sizeof(savefile)); 3511 3734 cmd.command = CMD_LOADFILE; 3512 3735 3513 3736 break; 3514 3737 } … … 3693 3916 cleanup_sound(); 3694 3917 3918 /* Update the Recent Items list - inserts newly created characters */ 3919 if (savefile[0]) 3920 updateRecentItems(savefile); 3695 3921 3696 3922 /* Dispose of graphic tiles */ … … 3755 3981 (void)Gestalt(gestaltSystemVersion, &mac_os_version); 3756 3982 3757 3758 3759 3983 /* Hooks in some "z-util.c" hooks */ 3760 3984 plog_aux = hook_plog; … … 3767 3991 SetCursor(*(GetCursor(watchCursor))); 3768 3992 3769 3993 /* Ensure that the recent items array is always an array */ 3994 recentItemsArrayRef = CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks); 3995 3770 3996 /* Prepare the menubar */ 3771 3997 init_menubar(); … … 3777 4003 init_windows(); 3778 4004 3779 /* Install the 'Apple Event' handler hook (ignore error codes) */3780 (void)AEInstallEventHandler(3781 kCoreEventClass,3782 kAEOpenDocuments,3783 NewAEEventHandlerUPP(AEH_Open),3784 0L,3785 FALSE);4005 /* Install the 'Apple Event' handler hook (ignore error codes) */ 4006 (void)AEInstallEventHandler( 4007 kCoreEventClass, 4008 kAEOpenDocuments, 4009 NewAEEventHandlerUPP(AEH_Open), 4010 0L, 4011 FALSE); 3786 4012 3787 4013 /* Install menu and application handlers */ … … 3826 4052 /* Start playing! */ 3827 4053 EventRef newGameEvent = nil; 3828 CreateEvent ( nil, 'Play', 'Band', GetCurrentEventTime(), 4054 CreateEvent ( nil, 'Play', 'Band', GetCurrentEventTime(), 3829 4055 kEventAttributeNone, &newGameEvent ); 3830 4056 PostEventToQueue(GetMainEventQueue(), newGameEvent, kEventPriorityLow); trunk/src/osx/English.lproj/main.nib/classes.nib
r1 r850 1 { 2 IBClasses = (); 3 IBVersion = 1; 4 } 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 <plist version="1.0"> 4 <dict> 5 <key>IBVersion</key> 6 <string>1</string> 7 </dict> 8 </plist> trunk/src/osx/English.lproj/main.nib/info.nib
r9 r850 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 3 <plist version="1.0"> 4 4 <dict> 5 <key>IBDocumentLocation</key>6 <string>81 68 356 240 0 0 1280 832 </string>7 <key>IBEditorPositions</key>8 <dict>9 <key>29</key>10 <string>75 721 402 44 0 0 1280 832 </string>11 </dict>12 5 <key>IBFramework Version</key> 13 <string> 446.1</string>6 <string>644</string> 14 7 <key>IBOldestOS</key> 15 8 <integer>3</integer> 16 9 <key>IBOpenObjects</key> 17 10 <array> 18 <integer> 29</integer>11 <integer>325</integer> 19 12 </array> 20 13 <key>IBSystem Version</key> 21 <string> 8L127</string>14 <string>9C7010</string> 22 15 <key>targetFramework</key> 23 16 <string>IBCarbonFramework</string> trunk/src/osx/English.lproj/main.nib/objects.xib
r9 r850 1 1 <?xml version="1.0" standalone="yes"?> 2 2 <object class="NSIBObjectData"> 3 <string name="targetFramework">IBCarbonFramework</string>4 3 <object name="rootObject" class="NSCustomObject" id="1"> 5 <string name="customClass">NSApplication</string>6 4 </object> 7 <array count="73" name="allObjects"> 5 <array count="67" name="allObjects"> 6 <object class="IBCarbonMenuItem" id="192"> 7 <string name="title">Window</string> 8 <boolean name="updateSingleItem">TRUE</boolean> 9 <object name="submenu" class="IBCarbonMenu" id="195"> 10 <string name="title">Window</string> 11 <int name="menuID">105</int> 12 <array count="14" name="items"> 13 <object class="IBCarbonMenuItem" id="190"> 14 <string name="title">Minimize Window</string> 15 <string name="keyEquivalent">m</string> 16 <ostype name="command">mini</ostype> 17 </object> 18 <object class="IBCarbonMenuItem" id="191"> 19 <string name="title">Minimize All Windows</string> 20 <string name="keyEquivalent">m</string> 21 <int name="keyEquivalentModifier">1572864</int> 22 <ostype name="command">mina</ostype> 23 </object> 24 <object class="IBCarbonMenuItem" id="194"> 25 <boolean name="separator">TRUE</boolean> 26 </object> 27 <object class="IBCarbonMenuItem" id="207"> 28 <string name="title">Angband</string> 29 <string name="keyEquivalent">0</string> 30 <boolean name="checked">TRUE</boolean> 31 <boolean name="updateSingleItem">TRUE</boolean> 32 <ostype name="command">wnd </ostype> 33 </object> 34 <object class="IBCarbonMenuItem" id="208"> 35 <string name="title">Terminal 1</string> 36 <string name="keyEquivalent">1</string> 37 <boolean name="updateSingleItem">TRUE</boolean> 38 <ostype name="command">wnd </ostype> 39 </object> 40 <object class="IBCarbonMenuItem" id="209"> 41 <string name="title">Terminal 2</string> 42 <string name="keyEquivalent">2</string> 43 <boolean name="updateSingleItem">TRUE</boolean> 44 <ostype name="command">wnd </ostype> 45 </object> 46 <object class="IBCarbonMenuItem" id="210"> 47 <string name="title">Terminal 3</string> 48 <string name="keyEquivalent">3</string> 49 <boolean name="updateSingleItem">TRUE</boolean> 50 <ostype name="command">wnd </ostype> 51 </object> 52 <object class="IBCarbonMenuItem" id="211"> 53 <string name="title">Terminal 4</string> 54 <string name="keyEquivalent">4</string> 55 <boolean name="updateSingleItem">TRUE</boolean> 56 <ostype name="command">wnd </ostype> 57 </object> 58 <object class="IBCarbonMenuItem" id="212"> 59 <string name="title">Terminal 5</string> 60 <string name="keyEquivalent">5</string> 61 <boolean name="updateSingleItem">TRUE</boolean> 62 <ostype name="command">wnd </ostype> 63 </object> 64 <object class="IBCarbonMenuItem" id="213"> 65 <string name="title">Terminal 6</string> 66 <string name="keyEquivalent">6</string> 67 <boolean name="updateSingleItem">TRUE</boolean> 68 <ostype name="command">wnd </ostype> 69 </object> 70 <object class="IBCarbonMenuItem" id="214"> 71 <string name="title">Terminal 7</string> 72 <string name="keyEquivalent">7</string> 73 <boolean name="updateSingleItem">TRUE</boolean> 74 <ostype name="command">wnd </ostype> 75 </object> 76 <object class="IBCarbonMenuItem" id="205"> 77 <boolean name="separator">TRUE</boolean> 78 <boolean name="updateSingleItem">TRUE</boolean> 79 </object> 80 <object class="IBCarbonMenuItem" id="196"> 81 <string name="title">Bring All to Front</string> 82 <string name="keyEquivalent">f</string> 83 <boolean name="updateSingleItem">TRUE</boolean> 84 <ostype name="command">bfrt</ostype> 85 </object> 86 <object class="IBCarbonMenuItem" id="193"> 87 <string name="title">Arrange in Front</string> 88 <string name="keyEquivalent">f</string> 89 <boolean name="updateSingleItem">TRUE</boolean> 90 <int name="keyEquivalentModifier">1572864</int> 91 <ostype name="command">frnt</ostype> 92 </object> 93 </array> 94 </object> 95 </object> 96 <reference idRef="208"/> 97 <object class="IBCarbonMenuItem" id="338"> 98 <string name="title">Open Recent</string> 99 <boolean name="disabled">TRUE</boolean> 100 <boolean name="notPreviousAlternate">TRUE</boolean> 101 <object name="submenu" class="IBCarbonMenu" id="339"> 102 <string name="title">Open Recent</string> 103 <int name="menuID">109</int> 104 </object> 105 </object> 106 <object class="IBCarbonTextView" id="345"> 107 <ostype name="controlSignature">DLOG</ostype> 108 <int name="controlID">4</int> 109 <int name="fontStyle">7</int> 110 <object name="layoutInfo" class="IBCarbonHILayoutInfo"> 111 <int name="bindingTopKind">1</int> 112 <int name="bindingLeftKind">1</int> 113 <int name="bindingBottomKind">2</int> 114 <int name="bindingRightKind">2</int> 115 </object> 116 <boolean name="noSelection">TRUE</boolean> 117 <boolean name="outputInUnicode">TRUE</boolean> 118 <boolean name="noDragProcs">TRUE</boolean> 119 <boolean name="noCaretWhenInactive">TRUE</boolean> 120 <boolean name="noSelectionWhenInactive">TRUE</boolean> 121 <boolean name="disableDragAndDrop">TRUE</boolean> 122 <boolean name="fontSubstitution">TRUE</boolean> 123 <string name="viewFrame">0 0 403 190 </string> 124 <string name="bounds">170 20 360 423 </string> 125 </object> 126 <reference idRef="339"/> 8 127 <object class="IBCarbonMenu" id="29"> 9 128 <string name="title">main</string> 129 <string name="name">_NSMainMenu</string> 10 130 <array count="6" name="items"> 11 131 <object class="IBCarbonMenuItem" id="185"> 132 <string name="title">Angband</string> 12 133 <boolean name="updateSingleItem">TRUE</boolean> 13 <string name="title">Angband</string>14 134 <object name="submenu" class="IBCarbonMenu" id="184"> 15 135 <string name="title">Angband</string> 16 136 <int name="menuID">100</int> 137 <string name="name">_NSAppleMenu</string> 17 138 <array count="1" name="items"> 18 139 <object class="IBCarbonMenuItem" id="187"> … … 22 143 </object> 23 144 </array> 24 <string name="name">_NSAppleMenu</string>25 145 </object> 26 146 </object> 27 147 <object class="IBCarbonMenuItem" id="127"> 148 <string name="title">File</string> 28 149 <boolean name="updateSingleItem">TRUE</boolean> 29 <string name="title">File</string>30 150 <object name="submenu" class="IBCarbonMenu" id="131"> 31 151 <string name="title">File</string> 32 152 <int name="menuID">101</int> 33 <array count=" 9" name="items">153 <array count="10" name="items"> 34 154 <object class="IBCarbonMenuItem" id="139"> 35 <boolean name="updateSingleItem">TRUE</boolean>36 155 <string name="title">New</string> 37 156 <string name="keyEquivalent">n</string> 157 <boolean name="updateSingleItem">TRUE</boolean> 38 158 <ostype name="command">open</ostype> 39 159 </object> 40 160 <object class="IBCarbonMenuItem" id="134"> 41 <boolean name="updateSingleItem">TRUE</boolean>42 161 <string name="title">OpenâŠ</string> 43 162 <string name="keyEquivalent">o</string> 163 <boolean name="updateSingleItem">TRUE</boolean> 44 164 <ostype name="command">open</ostype> 45 165 </object> 166 <reference idRef="338"/> 46 167 <object class="IBCarbonMenuItem" id="200"> 47 <boolean name="updateSingleItem">TRUE</boolean>48 168 <string name="title">Import...</string> 49 169 <string name="keyEquivalent">i</string> 170 <boolean name="updateSingleItem">TRUE</boolean> 50 171 <ostype name="command">open</ostype> 51 172 </object> … … 54 175 </object> 55 176 <object class="IBCarbonMenuItem" id="138"> 56 <boolean name="disabled">TRUE</boolean>57 177 <string name="title">Save</string> 58 178 <string name="keyEquivalent">s</string> 179 <boolean name="disabled">TRUE</boolean> 59 180 <ostype name="command">save</ostype> 60 181 </object> 61 182 <object class="IBCarbonMenuItem" id="245"> 62 <boolean name="updateSingleItem">TRUE</boolean>63 183 <string name="title">Close</string> 64 184 <string name="keyEquivalent">w</string> 185 <boolean name="updateSingleItem">TRUE</boolean> 65 186 <ostype name="command">clos</ostype> 66 187 </object> … … 69 190 </object> 70 191 <object class="IBCarbonMenuItem" id="135"> 71 <boolean name="disabled">TRUE</boolean>72 192 <string name="title">Page SetupâŠ</string> 73 193 <string name="keyEquivalent">P</string> 194 <boolean name="disabled">TRUE</boolean> 74 195 <ostype name="command">page</ostype> 75 196 </object> 76 197 <object class="IBCarbonMenuItem" id="136"> 77 <boolean name="disabled">TRUE</boolean>78 198 <string name="title">PrintâŠ</string> 79 199 <string name="keyEquivalent">p</string> 200 <boolean name="disabled">TRUE</boolean> 80 201 <ostype name="command">prnt</ostype> 81 202 </object> … … 84 205 </object> 85 206 <object class="IBCarbonMenuItem" id="152"> 207 <string name="title">Edit</string> 86 208 <boolean name="updateSingleItem">TRUE</boolean> 87 <string name="title">Edit</string>88 209 <object name="submenu" class="IBCarbonMenu" id="147"> 89 210 <string name="title">Edit</string> … … 91 212 <array count="3" name="items"> 92 213 <object class="IBCarbonMenuItem" id="149"> 93 <boolean name="disabled">TRUE</boolean>94 214 <string name="title">Copy</string> 95 215 <string name="keyEquivalent">c</string> 216 <boolean name="disabled">TRUE</boolean> 96 217 <ostype name="command">copy</ostype> 97 218 </object> 98 219 <object class="IBCarbonMenuItem" id="148"> 99 <boolean name="disabled">TRUE</boolean>100 <boolean name="updateSingleItem">TRUE</boolean>101 220 <string name="title">Select All</string> 102 221 <string name="keyEquivalent">a</string> 222 <boolean name="disabled">TRUE</boolean> 223 <boolean name="updateSingleItem">TRUE</boolean> 103 224 <ostype name="command">sall</ostype> 104 225 </object> 105 226 <object class="IBCarbonMenuItem" id="316"> 106 <boolean name="updateSingleItem">TRUE</boolean>107 227 <string name="title">Undo</string> 108 228 <string name="keyEquivalent">z</string> 229 <boolean name="updateSingleItem">TRUE</boolean> 109 230 <ostype name="command">undo</ostype> 110 231 </object> … … 113 234 </object> 114 235 <object class="IBCarbonMenuItem" id="217"> 236 <string name="title">Appearance</string> 115 237 <boolean name="autoDisable">TRUE</boolean> 116 238 <boolean name="updateSingleItem">TRUE</boolean> 117 <string name="title">Appearance</string>118 239 <object name="submenu" class="IBCarbonMenu" id="215"> 119 240 <string name="title">Appearance</string> 120 241 <int name="menuID">103</int> 242 <boolean name="autoDisable">TRUE</boolean> 121 243 <array count="13" name="items"> 122 244 <object class="IBCarbonMenuItem" id="297"> 123 <boolean name="updateSingleItem">TRUE</boolean>124 245 <string name="title">Show Fonts</string> 125 246 <string name="keyEquivalent">t</string> 247 <boolean name="updateSingleItem">TRUE</boolean> 126 248 <ostype name="command">font</ostype> 127 249 </object> 128 250 <object class="IBCarbonMenuItem" id="317"> 129 <boolean name="updateSingleItem">TRUE</boolean>130 251 <string name="title">Antialias</string> 252 <boolean name="updateSingleItem">TRUE</boolean> 131 253 </object> 132 254 <object class="IBCarbonMenuItem" id="305"> … … 135 257 </object> 136 258 <object class="IBCarbonMenuItem" id="306"> 259 <string name="title">ASCII Graphics</string> 137 260 <boolean name="checked">TRUE</boolean> 138 261 <boolean name="updateSingleItem">TRUE</boolean> 139 <string name="title">ASCII Graphics</string>140 262 <ostype name="command">graf</ostype> 141 263 </object> 142 264 <object class="IBCarbonMenuItem" id="304"> 143 <boolean name="disabled">TRUE</boolean>144 <boolean name="updateSingleItem">TRUE</boolean>145 265 <string name="title"> 8x8 Tiles</string> 266 <boolean name="disabled">TRUE</boolean> 267 <boolean name="updateSingleItem">TRUE</boolean> 146 268 <ostype name="command">graf</ostype> 147 269 &nb
