aboutsummaryrefslogtreecommitdiff
path: root/AppKit/GTMUILocalizer.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-09-09 21:00:41 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-09-09 21:00:41 +0000
commit42aa1c06dd802bfadc0f77f6b5a05f7f6fa2c067 (patch)
tree98d92b27ba7338765a3de92679e68f32b84090f2 /AppKit/GTMUILocalizer.m
parentef53b5beb4295064e9a8568362052f09d18906dc (diff)
[Author: thomasvl]
Support the toolbar item's view in state logging. Add table columns to ui localizer (tests will come in a following cl). Add a toolbar item that doesn't localize to help catch bugs in the future like we had on first impl. Add a tooltip to the toolbar item in the unittest for ui localizer. Add a note about the limits to ui localizer and toolbars due to the NSToolbar api's limits. R=dmaclach DELTA=746 (90 added, 599 deleted, 57 changed)
Diffstat (limited to 'AppKit/GTMUILocalizer.m')
-rw-r--r--AppKit/GTMUILocalizer.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/AppKit/GTMUILocalizer.m b/AppKit/GTMUILocalizer.m
index efdfb92..72c0b9d 100644
--- a/AppKit/GTMUILocalizer.m
+++ b/AppKit/GTMUILocalizer.m
@@ -119,6 +119,9 @@
}
- (void)localizeToolbar:(NSToolbar *)toolbar {
+ // NOTE: Like the header says, -items only gives us what is in the toolbar
+ // which is usually the default items, if the toolbar supports customization
+ // there is no way to fetch those possible items to tweak their contents.
NSToolbarItem *item;
GTM_FOREACH_OBJECT(item, [toolbar items]) {
NSString *label = [item label];
@@ -267,6 +270,16 @@
}
}
}
+
+ // Do NSTableView column headers.
+ if ([view isKindOfClass:[NSTableView class]]) {
+ NSTableView *tableView = (NSTableView *)view;
+ NSArray *columns = [tableView tableColumns];
+ NSTableColumn *column = nil;
+ GTM_FOREACH_OBJECT(column, columns) {
+ [self localizeCell:[column headerCell] recursively:recursive];
+ }
+ }
}
- (void)localizeMenu:(NSMenu *)menu recursively:(BOOL)recursive {