aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-04-16 04:30:29 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-04-16 04:30:29 +0000
commit4b39e586b5c5625b275a78f0efbc0a50e27e6a61 (patch)
tree7702606b513c5abf4ea068cf00b1bd3ea521813d
parentb8787b78e65a3b1ed18c406b0e2ea5232af7ac14 (diff)
[Author: dmaclach]
Fixed up GTMUILocalizer to work properly with popup menus and alternate titles. Fixed up UnitTesting code to check for it. R=thomasvl DELTA=3175 (3151 added, 14 deleted, 10 changed)
-rw-r--r--AppKit/GTMUILocalizer.h3
-rw-r--r--AppKit/GTMUILocalizer.m30
-rw-r--r--AppKit/GTMUILocalizerTestWindow.xib134
-rw-r--r--AppKit/TestData/GTMLargeTypeWindowLongTextTest.gtmUTState581
-rw-r--r--AppKit/TestData/GTMLargeTypeWindowMediumTextTest.gtmUTState581
-rw-r--r--AppKit/TestData/GTMLargeTypeWindowShortTextTest.gtmUTState581
-rw-r--r--AppKit/TestData/GTMUILocalizerView1State.gtmUTState2
-rw-r--r--AppKit/TestData/GTMUILocalizerView2State.gtmUTState2
-rw-r--r--AppKit/TestData/GTMUILocalizerWindow1State.gtmUTState73
-rw-r--r--AppKit/TestData/Resources/English.lproj/Localizable.stringsbin2122 -> 2246 bytes
-rw-r--r--UnitTesting/GTMAppKit+UnitTesting.h3
-rw-r--r--UnitTesting/GTMAppKit+UnitTesting.m23
-rw-r--r--UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState585
-rw-r--r--UnitTesting/TestData/GTMUnitTestingWindow.gtmUTState585
14 files changed, 3160 insertions, 23 deletions
diff --git a/AppKit/GTMUILocalizer.h b/AppKit/GTMUILocalizer.h
index d484cb2..54012cf 100644
--- a/AppKit/GTMUILocalizer.h
+++ b/AppKit/GTMUILocalizer.h
@@ -32,11 +32,12 @@
// be looked up in the Localizable.strings table without the caret as the
// key.
// Things that will be localized are:
-// - Titles (for menus, buttons, windows, menuitems, tabViewItem)
+// - Titles and altTitles (for menus, buttons, windows, menuitems, tabViewItem)
// - stringValue (for labels)
// - tooltips
// - accessibility help
// - accessibility description
+// - menus
//
// As an example if I wanted to localize a button with the word "Print" on
// it, I would put it in a window controlled by a NSWindowController that was
diff --git a/AppKit/GTMUILocalizer.m b/AppKit/GTMUILocalizer.m
index cfeb401..2f756d3 100644
--- a/AppKit/GTMUILocalizer.m
+++ b/AppKit/GTMUILocalizer.m
@@ -152,6 +152,17 @@
}
}
+ // Must do the menu before the titles, or else this will screw up
+ // popup menus on us.
+ [self localizeMenu:[view menu] recursively:recursive];
+ if (recursive) {
+ NSArray *subviews = [view subviews];
+ NSView *subview = nil;
+ GTM_FOREACH_OBJECT(subview, subviews) {
+ [self localizeView:subview recursively:recursive];
+ }
+ }
+
// Then do titles
if ([view isKindOfClass:[NSTextField class]]) {
NSString *title = [(NSTextField *)view stringValue];
@@ -168,6 +179,17 @@
[view performSelector:@selector(setTitle:) withObject:localizedTitle];
}
}
+ if ([view respondsToSelector:@selector(alternateTitle)]
+ && [view respondsToSelector:@selector(setAlternateTitle:)]) {
+ title = [view performSelector:@selector(alternateTitle)];
+ if (title) {
+ NSString *localizedTitle = [self localizedStringForString:title];
+ if (localizedTitle) {
+ [view performSelector:@selector(setAlternateTitle:)
+ withObject:localizedTitle];
+ }
+ }
+ }
} else if ([view respondsToSelector:@selector(tabViewItems)]) {
NSArray *items = [view performSelector:@selector(tabViewItems)];
NSEnumerator *itemEnum = [items objectEnumerator];
@@ -183,14 +205,6 @@
}
}
}
- [self localizeMenu:[view menu] recursively:recursive];
- if (recursive) {
- NSArray *subviews = [view subviews];
- NSView *subview = nil;
- GTM_FOREACH_OBJECT(subview, subviews) {
- [self localizeView:subview recursively:recursive];
- }
- }
}
}
diff --git a/AppKit/GTMUILocalizerTestWindow.xib b/AppKit/GTMUILocalizerTestWindow.xib
index 9584b76..320ff9a 100644
--- a/AppKit/GTMUILocalizerTestWindow.xib
+++ b/AppKit/GTMUILocalizerTestWindow.xib
@@ -8,7 +8,8 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="22"/>
+ <integer value="2"/>
+ <integer value="23"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -44,7 +45,7 @@
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<object class="NSView" key="NSWindowView" id="1006">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -181,8 +182,70 @@
<reference key="NSTextColor" ref="50010148"/>
</object>
</object>
+ <object class="NSPopUpButton" id="197597199">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{315, 67}, {100, 26}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSPopUpButtonCell" key="NSCell" id="1073502186">
+ <int key="NSCellFlags">-2076049856</int>
+ <int key="NSCellFlags2">2048</int>
+ <reference key="NSSupport" ref="168773824"/>
+ <reference key="NSControlView" ref="197597199"/>
+ <int key="NSButtonFlags">109199615</int>
+ <int key="NSButtonFlags2">129</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ <object class="NSMenuItem" key="NSMenuItem" id="180141984">
+ <reference key="NSMenu" ref="768660937"/>
+ <string key="NSTitle">^Item 2</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <int key="NSState">1</int>
+ <object class="NSCustomResource" key="NSOnImage" id="149491055">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuCheckmark</string>
+ </object>
+ <object class="NSCustomResource" key="NSMixedImage" id="291068490">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuMixedState</string>
+ </object>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="1073502186"/>
+ </object>
+ <bool key="NSMenuItemRespectAlignment">YES</bool>
+ <object class="NSMenu" key="NSMenu" id="768660937">
+ <string key="NSTitle">OtherViews</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="662787728">
+ <reference key="NSMenu" ref="768660937"/>
+ <string key="NSTitle">^Item 1</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="149491055"/>
+ <reference key="NSMixedImage" ref="291068490"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="1073502186"/>
+ </object>
+ <reference ref="180141984"/>
+ </object>
+ </object>
+ <int key="NSSelectedIndex">1</int>
+ <int key="NSPreferredEdge">1</int>
+ <bool key="NSUsesItemFromMenu">YES</bool>
+ <bool key="NSAltersState">YES</bool>
+ <int key="NSArrowPosition">2</int>
+ </object>
+ </object>
</object>
<string key="NSFrameSize">{480, 270}</string>
+ <reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
@@ -214,14 +277,8 @@
<string key="NSTitle">^MenuItemTest</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
- <object class="NSCustomResource" key="NSOnImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSMenuCheckmark</string>
- </object>
- <object class="NSCustomResource" key="NSMixedImage">
- <string key="NSClassName">NSImage</string>
- <string key="NSResourceName">NSMenuMixedState</string>
- </object>
+ <reference key="NSOnImage" ref="149491055"/>
+ <reference key="NSMixedImage" ref="291068490"/>
</object>
</object>
</object>
@@ -313,6 +370,7 @@
<reference ref="1054080138"/>
<reference ref="18987080"/>
<reference ref="39833761"/>
+ <reference ref="197597199"/>
</object>
<reference key="parent" ref="1005"/>
</object>
@@ -443,6 +501,44 @@
<reference key="object" ref="92471218"/>
<reference key="parent" ref="1002"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">35</int>
+ <reference key="object" ref="197597199"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1073502186"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">36</int>
+ <reference key="object" ref="1073502186"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="768660937"/>
+ </object>
+ <reference key="parent" ref="197597199"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">37</int>
+ <reference key="object" ref="768660937"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="662787728"/>
+ <reference ref="180141984"/>
+ </object>
+ <reference key="parent" ref="1073502186"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">38</int>
+ <reference key="object" ref="662787728"/>
+ <reference key="parent" ref="768660937"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">39</int>
+ <reference key="object" ref="180141984"/>
+ <reference key="parent" ref="768660937"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -475,6 +571,12 @@
<string>24.IBPluginDependency</string>
<string>25.IBPluginDependency</string>
<string>30.IBPluginDependency</string>
+ <string>35.IBPluginDependency</string>
+ <string>36.IBPluginDependency</string>
+ <string>37.IBEditorWindowLastContentRect</string>
+ <string>37.IBPluginDependency</string>
+ <string>38.IBPluginDependency</string>
+ <string>39.IBPluginDependency</string>
<string>4.IBPluginDependency</string>
<string>5.IBPluginDependency</string>
<string>6.IBPluginDependency</string>
@@ -501,9 +603,9 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{533, 1286}, {480, 270}}</string>
+ <string>{{2775, 1068}, {480, 270}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{533, 1286}, {480, 270}}</string>
+ <string>{{2775, 1068}, {480, 270}}</string>
<reference ref="6"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{126, 673}, {161, 23}}</string>
@@ -512,6 +614,12 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{478, 980}, {122, 43}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -538,7 +646,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">34</int>
+ <int key="maxID">40</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
diff --git a/AppKit/TestData/GTMLargeTypeWindowLongTextTest.gtmUTState b/AppKit/TestData/GTMLargeTypeWindowLongTextTest.gtmUTState
index e4687f5..32d0b37 100644
--- a/AppKit/TestData/GTMLargeTypeWindowLongTextTest.gtmUTState
+++ b/AppKit/TestData/GTMLargeTypeWindowLongTextTest.gtmUTState
@@ -14,6 +14,587 @@
<dict>
<key>ViewIsHidden</key>
<false/>
+ <key>ViewMenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Cut</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Copy</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Paste</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <false/>
+ <key>MenuItemIsSeparator</key>
+ <true/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string></string>
+ </dict>
+ <key>MenuItem 4</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Fonts</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>2</integer>
+ <key>MenuItemTitle</key>
+ <string>Bold</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>1</integer>
+ <key>MenuItemTitle</key>
+ <string>Italic</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Underline</string>
+ </dict>
+ <key>MenuItem 4</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Outline</string>
+ </dict>
+ <key>MenuItem 5</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Styles…</string>
+ </dict>
+ <key>MenuItem 6</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <false/>
+ <key>MenuItemIsSeparator</key>
+ <true/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string></string>
+ </dict>
+ <key>MenuItem 7</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Colors</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Font</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Font</string>
+ </dict>
+ <key>MenuItem 5</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Spelling and Grammar</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Document Now</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Spelling While Typing</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Grammar With Spelling</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Spelling and Grammar</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Spelling and Grammar</string>
+ </dict>
+ <key>MenuItem 6</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Copy/Paste</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Quotes</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Links</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Substitutions</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Substitutions</string>
+ </dict>
+ <key>MenuItem 7</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Start Speaking</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Stop Speaking</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Speech</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Speech</string>
+ </dict>
+ <key>MenuItem 8</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>-1</integer>
+ <key>MenuItemTitle</key>
+ <string>Default</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Left to Right</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>1</integer>
+ <key>MenuItemTitle</key>
+ <string>Right to Left</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Writing Direction</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Writing Direction</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Menu</string>
+ </dict>
</dict>
</dict>
<key>WindowIsMain</key>
diff --git a/AppKit/TestData/GTMLargeTypeWindowMediumTextTest.gtmUTState b/AppKit/TestData/GTMLargeTypeWindowMediumTextTest.gtmUTState
index e4687f5..32d0b37 100644
--- a/AppKit/TestData/GTMLargeTypeWindowMediumTextTest.gtmUTState
+++ b/AppKit/TestData/GTMLargeTypeWindowMediumTextTest.gtmUTState
@@ -14,6 +14,587 @@
<dict>
<key>ViewIsHidden</key>
<false/>
+ <key>ViewMenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Cut</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Copy</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Paste</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <false/>
+ <key>MenuItemIsSeparator</key>
+ <true/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string></string>
+ </dict>
+ <key>MenuItem 4</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Fonts</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>2</integer>
+ <key>MenuItemTitle</key>
+ <string>Bold</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>1</integer>
+ <key>MenuItemTitle</key>
+ <string>Italic</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Underline</string>
+ </dict>
+ <key>MenuItem 4</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Outline</string>
+ </dict>
+ <key>MenuItem 5</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Styles…</string>
+ </dict>
+ <key>MenuItem 6</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <false/>
+ <key>MenuItemIsSeparator</key>
+ <true/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string></string>
+ </dict>
+ <key>MenuItem 7</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Colors</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Font</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Font</string>
+ </dict>
+ <key>MenuItem 5</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Spelling and Grammar</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Document Now</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Spelling While Typing</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Grammar With Spelling</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Spelling and Grammar</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Spelling and Grammar</string>
+ </dict>
+ <key>MenuItem 6</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Copy/Paste</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Quotes</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Links</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Substitutions</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Substitutions</string>
+ </dict>
+ <key>MenuItem 7</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Start Speaking</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Stop Speaking</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Speech</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Speech</string>
+ </dict>
+ <key>MenuItem 8</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>-1</integer>
+ <key>MenuItemTitle</key>
+ <string>Default</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Left to Right</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>1</integer>
+ <key>MenuItemTitle</key>
+ <string>Right to Left</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Writing Direction</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Writing Direction</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Menu</string>
+ </dict>
</dict>
</dict>
<key>WindowIsMain</key>
diff --git a/AppKit/TestData/GTMLargeTypeWindowShortTextTest.gtmUTState b/AppKit/TestData/GTMLargeTypeWindowShortTextTest.gtmUTState
index e4687f5..32d0b37 100644
--- a/AppKit/TestData/GTMLargeTypeWindowShortTextTest.gtmUTState
+++ b/AppKit/TestData/GTMLargeTypeWindowShortTextTest.gtmUTState
@@ -14,6 +14,587 @@
<dict>
<key>ViewIsHidden</key>
<false/>
+ <key>ViewMenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Cut</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Copy</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Paste</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <false/>
+ <key>MenuItemIsSeparator</key>
+ <true/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string></string>
+ </dict>
+ <key>MenuItem 4</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Fonts</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>2</integer>
+ <key>MenuItemTitle</key>
+ <string>Bold</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>1</integer>
+ <key>MenuItemTitle</key>
+ <string>Italic</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Underline</string>
+ </dict>
+ <key>MenuItem 4</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Outline</string>
+ </dict>
+ <key>MenuItem 5</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Styles…</string>
+ </dict>
+ <key>MenuItem 6</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <false/>
+ <key>MenuItemIsSeparator</key>
+ <true/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string></string>
+ </dict>
+ <key>MenuItem 7</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Colors</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Font</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Font</string>
+ </dict>
+ <key>MenuItem 5</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Spelling and Grammar</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Document Now</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Spelling While Typing</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Grammar With Spelling</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Spelling and Grammar</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Spelling and Grammar</string>
+ </dict>
+ <key>MenuItem 6</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Copy/Paste</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Quotes</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Links</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Substitutions</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Substitutions</string>
+ </dict>
+ <key>MenuItem 7</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Start Speaking</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Stop Speaking</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Speech</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Speech</string>
+ </dict>
+ <key>MenuItem 8</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>-1</integer>
+ <key>MenuItemTitle</key>
+ <string>Default</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Left to Right</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>1</integer>
+ <key>MenuItemTitle</key>
+ <string>Right to Left</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Writing Direction</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Writing Direction</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Menu</string>
+ </dict>
</dict>
</dict>
<key>WindowIsMain</key>
diff --git a/AppKit/TestData/GTMUILocalizerView1State.gtmUTState b/AppKit/TestData/GTMUILocalizerView1State.gtmUTState
index e56930c..ae8dd86 100644
--- a/AppKit/TestData/GTMUILocalizerView1State.gtmUTState
+++ b/AppKit/TestData/GTMUILocalizerView1State.gtmUTState
@@ -34,6 +34,8 @@
</dict>
<key>ViewSubView 1</key>
<dict>
+ <key>ButtonAlternateTitle</key>
+ <string></string>
<key>ControlIsEnabled</key>
<true/>
<key>ControlSelectedCell</key>
diff --git a/AppKit/TestData/GTMUILocalizerView2State.gtmUTState b/AppKit/TestData/GTMUILocalizerView2State.gtmUTState
index ff80b28..f75d2af 100644
--- a/AppKit/TestData/GTMUILocalizerView2State.gtmUTState
+++ b/AppKit/TestData/GTMUILocalizerView2State.gtmUTState
@@ -10,6 +10,8 @@
<false/>
<key>ViewSubView 0</key>
<dict>
+ <key>ButtonAlternateTitle</key>
+ <string></string>
<key>ControlIsEnabled</key>
<true/>
<key>ControlSelectedCell</key>
diff --git a/AppKit/TestData/GTMUILocalizerWindow1State.gtmUTState b/AppKit/TestData/GTMUILocalizerWindow1State.gtmUTState
index 4884074..aea66e9 100644
--- a/AppKit/TestData/GTMUILocalizerWindow1State.gtmUTState
+++ b/AppKit/TestData/GTMUILocalizerWindow1State.gtmUTState
@@ -12,6 +12,8 @@
<false/>
<key>ViewSubView 0</key>
<dict>
+ <key>ButtonAlternateTitle</key>
+ <string></string>
<key>ControlIsEnabled</key>
<true/>
<key>ControlSelectedCell</key>
@@ -36,6 +38,8 @@
</dict>
<key>ViewSubView 1</key>
<dict>
+ <key>ButtonAlternateTitle</key>
+ <string></string>
<key>ControlIsEnabled</key>
<true/>
<key>ControlSelectedCell</key>
@@ -136,6 +140,75 @@
<key>ViewIsHidden</key>
<false/>
</dict>
+ <key>ViewSubView 5</key>
+ <dict>
+ <key>ButtonAlternateTitle</key>
+ <string></string>
+ <key>ControlIsEnabled</key>
+ <true/>
+ <key>ControlSelectedCell</key>
+ <dict>
+ <key>CellState</key>
+ <integer>1</integer>
+ <key>CellTag</key>
+ <integer>0</integer>
+ <key>CellTitle</key>
+ <string>Localized Item 2</string>
+ <key>CellValue</key>
+ <string>1</string>
+ </dict>
+ <key>ControlTag</key>
+ <integer>0</integer>
+ <key>ControlType</key>
+ <string>NSPopUpButton</string>
+ <key>ControlValue</key>
+ <string>1</string>
+ <key>ViewIsHidden</key>
+ <false/>
+ <key>ViewMenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Localized Item 1</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>1</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Localized Item 2</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>OtherViews</string>
+ </dict>
+ </dict>
</dict>
<key>WindowIsMain</key>
<false/>
diff --git a/AppKit/TestData/Resources/English.lproj/Localizable.strings b/AppKit/TestData/Resources/English.lproj/Localizable.strings
index d8e1b4c..9786563 100644
--- a/AppKit/TestData/Resources/English.lproj/Localizable.strings
+++ b/AppKit/TestData/Resources/English.lproj/Localizable.strings
Binary files differ
diff --git a/UnitTesting/GTMAppKit+UnitTesting.h b/UnitTesting/GTMAppKit+UnitTesting.h
index 1d6a08a..41fddf4 100644
--- a/UnitTesting/GTMAppKit+UnitTesting.h
+++ b/UnitTesting/GTMAppKit+UnitTesting.h
@@ -37,6 +37,9 @@
@interface NSTextField (GTMUnitTestingAdditions)
@end
+@interface NSButton (GTMUnitTestingAdditions)
+@end
+
@interface NSCell (GTMUnitTestingAdditions)
@end
diff --git a/UnitTesting/GTMAppKit+UnitTesting.m b/UnitTesting/GTMAppKit+UnitTesting.m
index b3247fd..9954301 100644
--- a/UnitTesting/GTMAppKit+UnitTesting.m
+++ b/UnitTesting/GTMAppKit+UnitTesting.m
@@ -100,6 +100,24 @@ GTM_METHOD_CHECK(NSObject, gtm_unitTestEncodeState:);
@end
+@implementation NSButton (GTMUnitTestingAdditions)
+
+// Encodes the state of an object in a manner suitable for comparing
+// against a master state file so we can determine whether the
+// object is in a suitable state.
+//
+// Arguments:
+// inCoder - the coder to encode our state into
+- (void)gtm_unitTestEncodeState:(NSCoder*)inCoder {
+ [super gtm_unitTestEncodeState:inCoder];
+ NSString *alternateTitle = [self alternateTitle];
+ if (alternateTitle) {
+ [inCoder encodeObject:alternateTitle forKey:@"ButtonAlternateTitle"];
+ }
+}
+
+@end
+
@implementation NSTextField (GTMUnitTestingAdditions)
- (BOOL)gtm_shouldEncodeStateForSubviews {
@@ -376,7 +394,10 @@ GTM_METHOD_CHECK(NSObject, gtm_unitTestEncodeState:);
= [self accessibilityAttributeValue:NSAccessibilityDescriptionAttribute];
[inCoder encodeObject:description forKey:@"ViewAccessibilityDescription"];
}
-
+ NSMenu *menu = [self menu];
+ if (menu) {
+ [inCoder encodeObject:menu forKey:@"ViewMenu"];
+ }
if ([self gtm_shouldEncodeStateForSubviews]) {
NSView *subview = nil;
int i = 0;
diff --git a/UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState b/UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState
index e7c7e05..ccbdfa8 100644
--- a/UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState
+++ b/UnitTesting/TestData/GTMUnitTestingTestApp.gtmUTState
@@ -1384,6 +1384,587 @@
<dict>
<key>ViewIsHidden</key>
<false/>
+ <key>ViewMenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Cut</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Copy</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Paste</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <false/>
+ <key>MenuItemIsSeparator</key>
+ <true/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string></string>
+ </dict>
+ <key>MenuItem 4</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Fonts</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>2</integer>
+ <key>MenuItemTitle</key>
+ <string>Bold</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>1</integer>
+ <key>MenuItemTitle</key>
+ <string>Italic</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Underline</string>
+ </dict>
+ <key>MenuItem 4</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Outline</string>
+ </dict>
+ <key>MenuItem 5</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Styles…</string>
+ </dict>
+ <key>MenuItem 6</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <false/>
+ <key>MenuItemIsSeparator</key>
+ <true/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string></string>
+ </dict>
+ <key>MenuItem 7</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Colors</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Font</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Font</string>
+ </dict>
+ <key>MenuItem 5</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Spelling and Grammar</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Document Now</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Spelling While Typing</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Grammar With Spelling</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Spelling and Grammar</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Spelling and Grammar</string>
+ </dict>
+ <key>MenuItem 6</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Copy/Paste</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Quotes</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Links</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Substitutions</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Substitutions</string>
+ </dict>
+ <key>MenuItem 7</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Start Speaking</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Stop Speaking</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Speech</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Speech</string>
+ </dict>
+ <key>MenuItem 8</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>-1</integer>
+ <key>MenuItemTitle</key>
+ <string>Default</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Left to Right</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>1</integer>
+ <key>MenuItemTitle</key>
+ <string>Right to Left</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Writing Direction</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Writing Direction</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Menu</string>
+ </dict>
</dict>
</dict>
<key>ViewSubView 1</key>
@@ -1513,6 +2094,8 @@
</dict>
<key>ViewSubView 5</key>
<dict>
+ <key>ButtonAlternateTitle</key>
+ <string></string>
<key>ControlIsEnabled</key>
<true/>
<key>ControlSelectedCell</key>
@@ -1561,6 +2144,8 @@
</dict>
<key>ViewSubView 7</key>
<dict>
+ <key>ButtonAlternateTitle</key>
+ <string></string>
<key>ControlIsEnabled</key>
<true/>
<key>ControlSelectedCell</key>
diff --git a/UnitTesting/TestData/GTMUnitTestingWindow.gtmUTState b/UnitTesting/TestData/GTMUnitTestingWindow.gtmUTState
index 17f77c8..c80a4fb 100644
--- a/UnitTesting/TestData/GTMUnitTestingWindow.gtmUTState
+++ b/UnitTesting/TestData/GTMUnitTestingWindow.gtmUTState
@@ -85,6 +85,587 @@
<dict>
<key>ViewIsHidden</key>
<false/>
+ <key>ViewMenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Cut</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Copy</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Paste</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <false/>
+ <key>MenuItemIsSeparator</key>
+ <true/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string></string>
+ </dict>
+ <key>MenuItem 4</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Fonts</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>2</integer>
+ <key>MenuItemTitle</key>
+ <string>Bold</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>1</integer>
+ <key>MenuItemTitle</key>
+ <string>Italic</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Underline</string>
+ </dict>
+ <key>MenuItem 4</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Outline</string>
+ </dict>
+ <key>MenuItem 5</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Styles…</string>
+ </dict>
+ <key>MenuItem 6</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <false/>
+ <key>MenuItemIsSeparator</key>
+ <true/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string></string>
+ </dict>
+ <key>MenuItem 7</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Colors</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Font</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Font</string>
+ </dict>
+ <key>MenuItem 5</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Show Spelling and Grammar</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Document Now</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Spelling While Typing</string>
+ </dict>
+ <key>MenuItem 3</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Check Grammar With Spelling</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Spelling and Grammar</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Spelling and Grammar</string>
+ </dict>
+ <key>MenuItem 6</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Copy/Paste</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Quotes</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Smart Links</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Substitutions</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Substitutions</string>
+ </dict>
+ <key>MenuItem 7</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Start Speaking</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Stop Speaking</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Speech</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Speech</string>
+ </dict>
+ <key>MenuItem 8</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemSubmenu</key>
+ <dict>
+ <key>MenuItem 0</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>-1</integer>
+ <key>MenuItemTitle</key>
+ <string>Default</string>
+ </dict>
+ <key>MenuItem 1</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Left to Right</string>
+ </dict>
+ <key>MenuItem 2</key>
+ <dict>
+ <key>MenuItemIndentationLevel</key>
+ <integer>0</integer>
+ <key>MenuItemIsAlternate</key>
+ <false/>
+ <key>MenuItemIsEnabled</key>
+ <true/>
+ <key>MenuItemIsSeparator</key>
+ <false/>
+ <key>MenuItemKeyEquivalent</key>
+ <string></string>
+ <key>MenuItemState</key>
+ <integer>0</integer>
+ <key>MenuItemTag</key>
+ <integer>1</integer>
+ <key>MenuItemTitle</key>
+ <string>Right to Left</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Writing Direction</string>
+ </dict>
+ <key>MenuItemTag</key>
+ <integer>0</integer>
+ <key>MenuItemTitle</key>
+ <string>Writing Direction</string>
+ </dict>
+ <key>MenuTitle</key>
+ <string>Menu</string>
+ </dict>
</dict>
</dict>
<key>ViewSubView 1</key>
@@ -214,6 +795,8 @@
</dict>
<key>ViewSubView 5</key>
<dict>
+ <key>ButtonAlternateTitle</key>
+ <string></string>
<key>ControlIsEnabled</key>
<true/>
<key>ControlSelectedCell</key>
@@ -262,6 +845,8 @@
</dict>
<key>ViewSubView 7</key>
<dict>
+ <key>ButtonAlternateTitle</key>
+ <string></string>
<key>ControlIsEnabled</key>
<true/>
<key>ControlSelectedCell</key>