Skip to content
Browse files

Clean spaces and tabs

  • Loading branch information...
1 parent be9000a commit 40f4bf967bbc4fa6b005857f8d4d47776e68d585 @niw niw committed Jan 31, 2010
Showing with 3 additions and 4 deletions.
  1. +3 −4 TerminalTabSwitching.m
View
7 TerminalTabSwitching.m
@@ -4,21 +4,20 @@ @implementation NSWindowController (Mine)
- (void)updateTabListMenu
{
NSMenu* windowsMenu = [[NSApplication sharedApplication] windowsMenu];
-
+
for(NSMenuItem* menuItem in [windowsMenu itemArray])
{
if([menuItem action] == @selector(selectRepresentedTabViewItem:))
[windowsMenu removeItem:menuItem];
}
-
NSArray* tabViewItems = [[self valueForKey:@"tabView"] tabViewItems];
for(size_t tabIndex = 0; tabIndex < [tabViewItems count]; ++tabIndex)
{
NSString* keyEquivalent = (tabIndex < 10) ? [NSString stringWithFormat:@"%d", (tabIndex+1)%10] : @"";
NSTabViewItem* tabViewItem = [tabViewItems objectAtIndex:tabIndex];
NSMenuItem* menuItem = [[NSMenuItem alloc] initWithTitle:[tabViewItem label]
- action:@selector(selectRepresentedTabViewItem:)
- keyEquivalent:keyEquivalent];
+ action:@selector(selectRepresentedTabViewItem:)
+ keyEquivalent:keyEquivalent];
[menuItem setRepresentedObject:tabViewItem];
[windowsMenu addItem:menuItem];
[menuItem release];

0 comments on commit 40f4bf9

Please sign in to comment.
Something went wrong with that request. Please try again.