From 4b39e586b5c5625b275a78f0efbc0a50e27e6a61 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Thu, 16 Apr 2009 04:30:29 +0000 Subject: [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) --- AppKit/GTMUILocalizer.h | 3 +- AppKit/GTMUILocalizer.m | 30 +- AppKit/GTMUILocalizerTestWindow.xib | 134 ++++- .../GTMLargeTypeWindowLongTextTest.gtmUTState | 581 ++++++++++++++++++++ .../GTMLargeTypeWindowMediumTextTest.gtmUTState | 581 ++++++++++++++++++++ .../GTMLargeTypeWindowShortTextTest.gtmUTState | 581 ++++++++++++++++++++ .../TestData/GTMUILocalizerView1State.gtmUTState | 2 + .../TestData/GTMUILocalizerView2State.gtmUTState | 2 + .../TestData/GTMUILocalizerWindow1State.gtmUTState | 73 +++ .../Resources/English.lproj/Localizable.strings | Bin 2122 -> 2246 bytes UnitTesting/GTMAppKit+UnitTesting.h | 3 + UnitTesting/GTMAppKit+UnitTesting.m | 23 +- .../TestData/GTMUnitTestingTestApp.gtmUTState | 585 +++++++++++++++++++++ .../TestData/GTMUnitTestingWindow.gtmUTState | 585 +++++++++++++++++++++ 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 @@ 353.00 YES - + + YES @@ -44,7 +45,7 @@ {3.40282e+38, 3.40282e+38} - + 256 YES @@ -181,8 +182,70 @@ + + + 268 + {{315, 67}, {100, 26}} + + YES + + -2076049856 + 2048 + + + 109199615 + 129 + + + 400 + 75 + + + ^Item 2 + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + ^Item 1 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + 1 + 1 + YES + YES + 2 + + {480, 270} + {{0, 0}, {1680, 1028}} {3.40282e+38, 3.40282e+38} @@ -214,14 +277,8 @@ ^MenuItemTest 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - + + @@ -313,6 +370,7 @@ + @@ -443,6 +501,44 @@ + + 35 + + + YES + + + + + + 36 + + + YES + + + + + + 37 + + + YES + + + + + + + 38 + + + + + 39 + + + @@ -475,6 +571,12 @@ 24.IBPluginDependency 25.IBPluginDependency 30.IBPluginDependency + 35.IBPluginDependency + 36.IBPluginDependency + 37.IBEditorWindowLastContentRect + 37.IBPluginDependency + 38.IBPluginDependency + 39.IBPluginDependency 4.IBPluginDependency 5.IBPluginDependency 6.IBPluginDependency @@ -501,9 +603,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{533, 1286}, {480, 270}} + {{2775, 1068}, {480, 270}} com.apple.InterfaceBuilder.CocoaPlugin - {{533, 1286}, {480, 270}} + {{2775, 1068}, {480, 270}} com.apple.InterfaceBuilder.CocoaPlugin {{126, 673}, {161, 23}} @@ -512,6 +614,12 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + {{478, 980}, {122, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -538,7 +646,7 @@ - 34 + 40 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 @@ ViewIsHidden + ViewMenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Cut + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Copy + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Paste + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + + + MenuItem 4 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Fonts + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 2 + MenuItemTitle + Bold + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 1 + MenuItemTitle + Italic + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Underline + + MenuItem 4 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Outline + + MenuItem 5 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Styles… + + MenuItem 6 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + + + MenuItem 7 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Colors + + MenuTitle + Font + + MenuItemTag + 0 + MenuItemTitle + Font + + MenuItem 5 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Spelling and Grammar + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Document Now + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Spelling While Typing + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Grammar With Spelling + + MenuTitle + Spelling and Grammar + + MenuItemTag + 0 + MenuItemTitle + Spelling and Grammar + + MenuItem 6 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Copy/Paste + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Quotes + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Links + + MenuTitle + Substitutions + + MenuItemTag + 0 + MenuItemTitle + Substitutions + + MenuItem 7 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Start Speaking + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Stop Speaking + + MenuTitle + Speech + + MenuItemTag + 0 + MenuItemTitle + Speech + + MenuItem 8 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + -1 + MenuItemTitle + Default + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Left to Right + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 1 + MenuItemTitle + Right to Left + + MenuTitle + Writing Direction + + MenuItemTag + 0 + MenuItemTitle + Writing Direction + + MenuTitle + Menu + WindowIsMain 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 @@ ViewIsHidden + ViewMenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Cut + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Copy + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Paste + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + + + MenuItem 4 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Fonts + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 2 + MenuItemTitle + Bold + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 1 + MenuItemTitle + Italic + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Underline + + MenuItem 4 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Outline + + MenuItem 5 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Styles… + + MenuItem 6 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + + + MenuItem 7 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Colors + + MenuTitle + Font + + MenuItemTag + 0 + MenuItemTitle + Font + + MenuItem 5 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Spelling and Grammar + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Document Now + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Spelling While Typing + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Grammar With Spelling + + MenuTitle + Spelling and Grammar + + MenuItemTag + 0 + MenuItemTitle + Spelling and Grammar + + MenuItem 6 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Copy/Paste + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Quotes + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Links + + MenuTitle + Substitutions + + MenuItemTag + 0 + MenuItemTitle + Substitutions + + MenuItem 7 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Start Speaking + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Stop Speaking + + MenuTitle + Speech + + MenuItemTag + 0 + MenuItemTitle + Speech + + MenuItem 8 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + -1 + MenuItemTitle + Default + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Left to Right + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 1 + MenuItemTitle + Right to Left + + MenuTitle + Writing Direction + + MenuItemTag + 0 + MenuItemTitle + Writing Direction + + MenuTitle + Menu + WindowIsMain 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 @@ ViewIsHidden + ViewMenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Cut + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Copy + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Paste + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + + + MenuItem 4 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Fonts + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 2 + MenuItemTitle + Bold + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 1 + MenuItemTitle + Italic + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Underline + + MenuItem 4 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Outline + + MenuItem 5 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Styles… + + MenuItem 6 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + + + MenuItem 7 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Colors + + MenuTitle + Font + + MenuItemTag + 0 + MenuItemTitle + Font + + MenuItem 5 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Spelling and Grammar + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Document Now + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Spelling While Typing + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Grammar With Spelling + + MenuTitle + Spelling and Grammar + + MenuItemTag + 0 + MenuItemTitle + Spelling and Grammar + + MenuItem 6 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Copy/Paste + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Quotes + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Links + + MenuTitle + Substitutions + + MenuItemTag + 0 + MenuItemTitle + Substitutions + + MenuItem 7 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Start Speaking + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Stop Speaking + + MenuTitle + Speech + + MenuItemTag + 0 + MenuItemTitle + Speech + + MenuItem 8 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + -1 + MenuItemTitle + Default + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Left to Right + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 1 + MenuItemTitle + Right to Left + + MenuTitle + Writing Direction + + MenuItemTag + 0 + MenuItemTitle + Writing Direction + + MenuTitle + Menu + WindowIsMain 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 @@ ViewSubView 1 + ButtonAlternateTitle + ControlIsEnabled ControlSelectedCell 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 @@ ViewSubView 0 + ButtonAlternateTitle + ControlIsEnabled ControlSelectedCell 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 @@ ViewSubView 0 + ButtonAlternateTitle + ControlIsEnabled ControlSelectedCell @@ -36,6 +38,8 @@ ViewSubView 1 + ButtonAlternateTitle + ControlIsEnabled ControlSelectedCell @@ -136,6 +140,75 @@ ViewIsHidden + ViewSubView 5 + + ButtonAlternateTitle + + ControlIsEnabled + + ControlSelectedCell + + CellState + 1 + CellTag + 0 + CellTitle + Localized Item 2 + CellValue + 1 + + ControlTag + 0 + ControlType + NSPopUpButton + ControlValue + 1 + ViewIsHidden + + ViewMenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Localized Item 1 + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 1 + MenuItemTag + 0 + MenuItemTitle + Localized Item 2 + + MenuTitle + OtherViews + + WindowIsMain diff --git a/AppKit/TestData/Resources/English.lproj/Localizable.strings b/AppKit/TestData/Resources/English.lproj/Localizable.strings index d8e1b4c..9786563 100644 Binary files a/AppKit/TestData/Resources/English.lproj/Localizable.strings and b/AppKit/TestData/Resources/English.lproj/Localizable.strings 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 @@ ViewIsHidden + ViewMenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Cut + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Copy + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Paste + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + + + MenuItem 4 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Fonts + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 2 + MenuItemTitle + Bold + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 1 + MenuItemTitle + Italic + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Underline + + MenuItem 4 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Outline + + MenuItem 5 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Styles… + + MenuItem 6 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + + + MenuItem 7 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Colors + + MenuTitle + Font + + MenuItemTag + 0 + MenuItemTitle + Font + + MenuItem 5 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Spelling and Grammar + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Document Now + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Spelling While Typing + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Grammar With Spelling + + MenuTitle + Spelling and Grammar + + MenuItemTag + 0 + MenuItemTitle + Spelling and Grammar + + MenuItem 6 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Copy/Paste + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Quotes + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Links + + MenuTitle + Substitutions + + MenuItemTag + 0 + MenuItemTitle + Substitutions + + MenuItem 7 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Start Speaking + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Stop Speaking + + MenuTitle + Speech + + MenuItemTag + 0 + MenuItemTitle + Speech + + MenuItem 8 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + -1 + MenuItemTitle + Default + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Left to Right + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 1 + MenuItemTitle + Right to Left + + MenuTitle + Writing Direction + + MenuItemTag + 0 + MenuItemTitle + Writing Direction + + MenuTitle + Menu + ViewSubView 1 @@ -1513,6 +2094,8 @@ ViewSubView 5 + ButtonAlternateTitle + ControlIsEnabled ControlSelectedCell @@ -1561,6 +2144,8 @@ ViewSubView 7 + ButtonAlternateTitle + ControlIsEnabled ControlSelectedCell 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 @@ ViewIsHidden + ViewMenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Cut + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Copy + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Paste + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + + + MenuItem 4 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Fonts + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 2 + MenuItemTitle + Bold + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 1 + MenuItemTitle + Italic + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Underline + + MenuItem 4 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Outline + + MenuItem 5 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Styles… + + MenuItem 6 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + + + MenuItem 7 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Colors + + MenuTitle + Font + + MenuItemTag + 0 + MenuItemTitle + Font + + MenuItem 5 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Show Spelling and Grammar + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Document Now + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Spelling While Typing + + MenuItem 3 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Check Grammar With Spelling + + MenuTitle + Spelling and Grammar + + MenuItemTag + 0 + MenuItemTitle + Spelling and Grammar + + MenuItem 6 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Copy/Paste + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Quotes + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Smart Links + + MenuTitle + Substitutions + + MenuItemTag + 0 + MenuItemTitle + Substitutions + + MenuItem 7 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Start Speaking + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Stop Speaking + + MenuTitle + Speech + + MenuItemTag + 0 + MenuItemTitle + Speech + + MenuItem 8 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemSubmenu + + MenuItem 0 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + -1 + MenuItemTitle + Default + + MenuItem 1 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 0 + MenuItemTitle + Left to Right + + MenuItem 2 + + MenuItemIndentationLevel + 0 + MenuItemIsAlternate + + MenuItemIsEnabled + + MenuItemIsSeparator + + MenuItemKeyEquivalent + + MenuItemState + 0 + MenuItemTag + 1 + MenuItemTitle + Right to Left + + MenuTitle + Writing Direction + + MenuItemTag + 0 + MenuItemTitle + Writing Direction + + MenuTitle + Menu + ViewSubView 1 @@ -214,6 +795,8 @@ ViewSubView 5 + ButtonAlternateTitle + ControlIsEnabled ControlSelectedCell @@ -262,6 +845,8 @@ ViewSubView 7 + ButtonAlternateTitle + ControlIsEnabled ControlSelectedCell -- cgit v1.2.3