From 5eca837c7b35dc6c7a22d32e482399c897f0a566 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 17 Jun 2010 08:04:13 +0000 Subject: =?UTF-8?q?=E2=80=A2=20if=20a=20text=20string=20is=20dragged=20on?= =?UTF-8?q?=20tab=20this=20tab=20will=20be=20selected=20and=20the=20corres?= =?UTF-8?q?ponding=20db=20doc=20switches=20to=20Custom=20Query=20editor=20?= =?UTF-8?q?to=20be=20able=20eg=20to=20drag=20a=20query=20from=20one=20tab?= =?UTF-8?q?=20to=20another=20one?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frameworks/PSMTabBar/PSMTabBarControl.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Frameworks') diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m index 5b72f1e6..fdd30396 100644 --- a/Frameworks/PSMTabBar/PSMTabBarControl.m +++ b/Frameworks/PSMTabBar/PSMTabBarControl.m @@ -305,7 +305,7 @@ { delegate = object; - NSMutableArray *types = [NSMutableArray arrayWithObject:@"PSMTabBarControlItemPBType"]; + NSMutableArray *types = [NSMutableArray arrayWithObjects:@"PSMTabBarControlItemPBType", NSStringPboardType,nil]; //Update the allowed drag types if ([self delegate] && [[self delegate] respondsToSelector:@selector(allowedDraggedTypesForTabView:)]) { @@ -1499,6 +1499,12 @@ userInfo:sender repeats:NO] retain]; } + //If user drags a text string to a tab switch to Custom Query Editor + if (![[[cell representedObject] identifier] isCustomQuerySelected] + && [[[sender draggingPasteboard] types] indexOfObject:NSStringPboardType] != NSNotFound) { + [[[cell representedObject] identifier] performSelector:@selector(viewQuery:) withObject:nil]; + NSLog(@"A"); + } } return NSDragOperationCopy; } -- cgit v1.2.3