Permalink
Browse files

Change the point to hook tab closing event

  • Loading branch information...
1 parent 315c3e4 commit 627ce4a61f961542f837ea4220849b25b4198c77 @niw niw committed Feb 1, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 TerminalTabSwitching.m
View
@@ -48,9 +48,9 @@ - (void)TerminalTabSwitching_newTab:(id)fp8
[self updateTabListMenu];
}
-- (void)TerminalTabSwitching_closeTab:(id)fp8
+- (void)TerminalTabSwitching_tabView:(id)arg1 didCloseTabViewItem:(id)arg2
{
- [self TerminalTabSwitching_closeTab:fp8];
+ [self TerminalTabSwitching_tabView:arg1 didCloseTabViewItem:arg2];
[self updateTabListMenu];
}
@@ -76,7 +76,7 @@ + (void)load
[NSClassFromString(@"TTWindowController") jr_swizzleMethod:@selector(windowDidBecomeMain:) withMethod:@selector(TerminalTabSwitching_windowDidBecomeMain:) error:NULL];
[NSClassFromString(@"TTWindowController") jr_swizzleMethod:@selector(windowDidLoad) withMethod:@selector(TerminalTabSwitching_windowDidLoad) error:NULL];
[NSClassFromString(@"TTWindowController") jr_swizzleMethod:@selector(newTab:) withMethod:@selector(TerminalTabSwitching_newTab:) error:NULL];
- [NSClassFromString(@"TTWindowController") jr_swizzleMethod:@selector(closeTab:) withMethod:@selector(TerminalTabSwitching_closeTab:) error:NULL];
+ [NSClassFromString(@"TTWindowController") jr_swizzleMethod:@selector(tabView:didCloseTabViewItem:) withMethod:@selector(TerminalTabSwitching_tabView:didCloseTabViewItem:) error:NULL];
[NSClassFromString(@"TTWindowController") jr_swizzleMethod:@selector(mergeAllWindows:) withMethod:@selector(TerminalTabSwitching_mergeAllWindows:) error:NULL];
NSApplication *app = [NSApplication sharedApplication];
@@ -99,4 +99,4 @@ + (void)load
NSLog(@"TerminalTabSwitching installed");
}
-@end
+@end

0 comments on commit 627ce4a

Please sign in to comment.