From 32e3cbaf916d06f9375d4b19c4ae2b4492f7960a Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sat, 3 Jul 2010 14:33:24 +0000 Subject: - Fix tab bars in windows with only one tab not disappearing after dragging a tab past/through them, by using PSMTabBar notifications instead of our own notifications; also fix PSMTabBar notification ordering. - When a tab drag starts, reorder all windows in front of other applications --- Source/SPWindowController.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Source/SPWindowController.m') diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m index ed443ac4..7eb83765 100644 --- a/Source/SPWindowController.m +++ b/Source/SPWindowController.m @@ -73,8 +73,8 @@ closeTabMenuItem = [[[[NSApp mainMenu] itemWithTag:SPMainMenuFile] submenu] itemWithTag:1103]; // Register for drag start and stop notifications - used to show/hide tab bars - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tabDragStarted:) name:@"SPTabDragStart" object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tabDragStopped:) name:@"SPTabDragStop" object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tabDragStarted:) name:PSMTabDragDidBeginNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tabDragStopped:) name:PSMTabDragDidEndNotification object:nil]; } /** @@ -375,7 +375,6 @@ */ - (BOOL)tabView:(NSTabView *)aTabView shouldDragTabViewItem:(NSTabViewItem *)tabViewItem fromTabBar:(PSMTabBarControl *)tabBarControl { - [[NSNotificationCenter defaultCenter] postNotificationName:@"SPTabDragStart" object:self]; return YES; } @@ -408,8 +407,6 @@ // Check the window and move it to front if it's key (eg for new window creation) if ([[tabBarControl window] isKeyWindow]) [[tabBarControl window] orderFront:self]; - - [[NSNotificationCenter defaultCenter] postNotificationName:@"SPTabDragStop" object:self]; } /** -- cgit v1.2.3