The R Project SVN R-packages

Rev

Rev 6077 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6077 Rev 6129
Line 612... Line 612...
612
		pasteboard = [NSPasteboard pasteboardWithName:NSDragPboard];
612
		pasteboard = [NSPasteboard pasteboardWithName:NSDragPboard];
613
		[pasteboard declareTypes:[NSArray arrayWithObject:@"NSToolbarIndividualItemDragType"] owner:nil];
613
		[pasteboard declareTypes:[NSArray arrayWithObject:@"NSToolbarIndividualItemDragType"] owner:nil];
614
		[pasteboard setString:[_am_selectedIcon itemIdentifier] forType:@"NSToolbarItemIdentifierPboardType"];
614
		[pasteboard setString:[_am_selectedIcon itemIdentifier] forType:@"NSToolbarItemIdentifierPboardType"];
615
		// deselect icon
615
		// deselect icon
616
		[self setNeedsDisplay:YES];
616
		[self setNeedsDisplay:YES];
-
 
617
 
-
 
618
		// still over the same icon from which the mouseDown event came?
-
 
619
		// if so - do not clear _am_selectedIcon since for Lion _am_selectedIcon will be set to nil
-
 
620
		// [due to the fact that mouseDragged is also called for mouseDown]
-
 
621
		// and mouseUp event will never invoke clicked icon in category overview
-
 
622
		// <TODO> the entire Pref Pane stuff should be re-written since the code is VERY old!
-
 
623
		localPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
-
 
624
		AMPrefPaneIcon *icon_cur = [self iconAt:localPoint categoryIndex:&_am_selectedIconCategory iconIndex:&_am_selectedIconIndex];
-
 
625
		if (icon_cur != _am_selectedIcon)
617
		[self _am_setSelectedIcon:nil];
626
			[self _am_setSelectedIcon:nil];
-
 
627
 
618
		[self displayIfNeeded];
628
		[self displayIfNeeded];
619
		// initiate drag
629
		// initiate drag
620
		[self dragImage:image at:imageOrigin offset:dragOffset event:theEvent pasteboard:pasteboard source:self slideBack:YES];
630
		[self dragImage:image at:imageOrigin offset:dragOffset event:theEvent pasteboard:pasteboard source:self slideBack:YES];
621
	}
631
	}
622
}
632
}