2005-06-02 14:16:43 -04:00
|
|
|
//
|
|
|
|
// PlaylistView.m
|
|
|
|
// Cog
|
|
|
|
//
|
|
|
|
// Created by Vincent Spader on 3/20/05.
|
2005-07-02 17:02:06 -04:00
|
|
|
// Copyright 2005 Vincent Spader All rights reserved.
|
2005-06-02 14:16:43 -04:00
|
|
|
//
|
|
|
|
|
|
|
|
#import "PlaylistView.h"
|
2006-01-20 12:22:03 -03:00
|
|
|
#import "PlaybackController.h"
|
2005-06-02 14:16:43 -04:00
|
|
|
#import "PlaylistController.h"
|
|
|
|
|
2007-03-13 22:28:30 -04:00
|
|
|
#import "IndexFormatter.h"
|
|
|
|
#import "SecondsFormatter.h"
|
2008-03-03 21:43:47 -03:00
|
|
|
#import "BlankZeroFormatter.h"
|
2008-02-16 16:40:34 -03:00
|
|
|
#import "PlaylistEntry.h"
|
2007-03-13 22:28:30 -04:00
|
|
|
|
2008-02-23 19:20:14 -03:00
|
|
|
#import "CogAudio/Status.h"
|
|
|
|
|
2013-10-13 02:08:34 -03:00
|
|
|
#import "Logging.h"
|
|
|
|
|
2005-06-02 14:16:43 -04:00
|
|
|
@implementation PlaylistView
|
|
|
|
|
2006-04-28 19:19:14 -04:00
|
|
|
- (void)awakeFromNib
|
|
|
|
{
|
2007-05-23 07:08:56 -04:00
|
|
|
[[self menu] setAutoenablesItems:NO];
|
|
|
|
|
2008-02-18 07:28:24 -03:00
|
|
|
// Configure bindings to scale font size and row height
|
2008-02-17 21:11:38 -03:00
|
|
|
NSControlSize s = NSSmallControlSize;
|
2006-04-28 19:19:14 -04:00
|
|
|
NSFont *f = [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:s]];
|
2008-02-17 21:11:38 -03:00
|
|
|
// NSFont *bf = [[NSFontManager sharedFontManager] convertFont:f toHaveTrait:NSBoldFontMask];
|
2008-02-23 10:57:33 -03:00
|
|
|
|
2008-03-01 12:04:46 -03:00
|
|
|
for (NSTableColumn *col in [self tableColumns]) {
|
2008-02-17 21:11:38 -03:00
|
|
|
[[col dataCell] setControlSize:s];
|
|
|
|
[[col dataCell] setFont:f];
|
2006-04-28 19:19:14 -04:00
|
|
|
}
|
2007-03-13 22:28:30 -04:00
|
|
|
|
2007-03-13 23:16:37 -04:00
|
|
|
//Set up formatters
|
2007-03-13 22:28:30 -04:00
|
|
|
NSFormatter *secondsFormatter = [[SecondsFormatter alloc] init];
|
|
|
|
[[[self tableColumnWithIdentifier:@"length"] dataCell] setFormatter:secondsFormatter];
|
|
|
|
|
|
|
|
NSFormatter *indexFormatter = [[IndexFormatter alloc] init];
|
|
|
|
[[[self tableColumnWithIdentifier:@"index"] dataCell] setFormatter:indexFormatter];
|
2008-03-03 21:43:47 -03:00
|
|
|
|
|
|
|
NSFormatter *blankZeroFormatter = [[BlankZeroFormatter alloc] init];
|
|
|
|
[[[self tableColumnWithIdentifier:@"track"] dataCell] setFormatter:blankZeroFormatter];
|
|
|
|
[[[self tableColumnWithIdentifier:@"year"] dataCell] setFormatter:blankZeroFormatter];
|
2007-03-13 23:16:37 -04:00
|
|
|
//end setting up formatters
|
|
|
|
|
2006-04-28 20:03:28 -04:00
|
|
|
[self setVerticalMotionCanBeginDrag:YES];
|
2007-03-13 23:16:37 -04:00
|
|
|
|
|
|
|
//Set up header context menu
|
|
|
|
headerContextMenu = [[NSMenu alloc] initWithTitle:@"Playlist Header Context Menu"];
|
|
|
|
|
2008-02-29 23:48:12 -03:00
|
|
|
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"identifier" ascending:YES];
|
2007-03-13 23:16:37 -04:00
|
|
|
NSArray *sortDescriptors = [NSArray arrayWithObject:sortDescriptor];
|
2008-02-15 22:44:01 -03:00
|
|
|
|
|
|
|
int visibleTableColumns = 0;
|
2007-03-13 23:16:37 -04:00
|
|
|
int menuIndex = 0;
|
2008-02-18 07:28:24 -03:00
|
|
|
for (NSTableColumn *col in [[self tableColumns] sortedArrayUsingDescriptors: sortDescriptors])
|
|
|
|
{
|
2008-02-29 23:48:12 -03:00
|
|
|
NSString *title;
|
|
|
|
if ([[col identifier] isEqualToString:@"status"])
|
|
|
|
{
|
|
|
|
title = @"Status";
|
|
|
|
}
|
|
|
|
else if ([[col identifier] isEqualToString:@"index"])
|
|
|
|
{
|
|
|
|
title = @"Index";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
title = [[col headerCell] title];
|
|
|
|
}
|
|
|
|
|
|
|
|
NSMenuItem *contextMenuItem = [headerContextMenu insertItemWithTitle:title action:@selector(toggleColumn:) keyEquivalent:@"" atIndex:menuIndex];
|
2007-03-13 23:16:37 -04:00
|
|
|
|
|
|
|
[contextMenuItem setTarget:self];
|
|
|
|
[contextMenuItem setRepresentedObject:col];
|
2008-01-23 22:44:24 -03:00
|
|
|
[contextMenuItem setState:([col isHidden] ? NSOffState : NSOnState)];
|
2007-03-13 23:16:37 -04:00
|
|
|
|
2008-02-15 22:44:01 -03:00
|
|
|
visibleTableColumns += ![col isHidden];
|
2007-03-13 23:16:37 -04:00
|
|
|
menuIndex++;
|
|
|
|
}
|
2008-02-15 22:44:01 -03:00
|
|
|
|
|
|
|
if (visibleTableColumns == 0) {
|
|
|
|
for (NSTableColumn *col in [self tableColumns]) {
|
|
|
|
[col setHidden:NO];
|
|
|
|
}
|
|
|
|
}
|
2007-03-13 23:16:37 -04:00
|
|
|
|
|
|
|
[[self headerView] setMenu:headerContextMenu];
|
2006-06-18 20:39:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-02-17 16:33:31 -03:00
|
|
|
- (IBAction)toggleColumn:(id)sender
|
2006-06-18 20:39:41 -04:00
|
|
|
{
|
2007-02-17 16:33:31 -03:00
|
|
|
id tc = [sender representedObject];
|
2007-02-17 15:29:20 -03:00
|
|
|
|
|
|
|
if ([sender state] == NSOffState)
|
|
|
|
{
|
|
|
|
[sender setState:NSOnState];
|
2006-06-18 20:39:41 -04:00
|
|
|
|
2008-01-23 22:44:24 -03:00
|
|
|
[tc setHidden: NO];
|
2007-02-17 15:29:20 -03:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
[sender setState:NSOffState];
|
2008-01-23 22:44:24 -03:00
|
|
|
|
|
|
|
[tc setHidden: YES];
|
2007-02-17 15:29:20 -03:00
|
|
|
}
|
2006-06-18 20:39:41 -04:00
|
|
|
}
|
|
|
|
|
2005-06-02 14:16:43 -04:00
|
|
|
- (BOOL)acceptsFirstResponder
|
|
|
|
{
|
|
|
|
return YES;
|
|
|
|
}
|
2007-02-18 15:59:23 -03:00
|
|
|
|
2005-06-02 14:16:43 -04:00
|
|
|
- (BOOL)resignFirstResponder
|
|
|
|
{
|
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
2005-06-30 13:46:07 -04:00
|
|
|
- (BOOL)acceptsFirstMouse:(NSEvent *)mouseDownEvent
|
|
|
|
{
|
|
|
|
return NO;
|
|
|
|
}
|
|
|
|
|
2005-06-02 14:16:43 -04:00
|
|
|
- (void)mouseDown:(NSEvent *)e
|
|
|
|
{
|
2007-05-27 10:04:42 -04:00
|
|
|
[super mouseDown:e];
|
|
|
|
|
2008-02-16 11:09:19 -03:00
|
|
|
if ([e type] == NSLeftMouseDown && [e clickCount] == 2 && [[self selectedRowIndexes] count] == 1)
|
2005-06-02 14:16:43 -04:00
|
|
|
{
|
2006-01-20 12:22:03 -03:00
|
|
|
[playbackController play:self];
|
2005-06-02 14:16:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-05-23 11:12:24 -04:00
|
|
|
// enables right-click selection for "Show in Finder" contextual menu
|
|
|
|
-(NSMenu*)menuForEvent:(NSEvent*)event
|
|
|
|
{
|
|
|
|
//Find which row is under the cursor
|
|
|
|
[[self window] makeFirstResponder:self];
|
2008-02-10 13:16:45 -03:00
|
|
|
NSPoint menuPoint = [self convertPoint:[event locationInWindow] fromView:nil];
|
2008-02-16 13:13:21 -03:00
|
|
|
NSInteger iRow = [self rowAtPoint:menuPoint];
|
2008-03-11 20:31:19 -03:00
|
|
|
NSMenu* tableViewMenu = [self menu];
|
2006-05-23 11:12:24 -04:00
|
|
|
|
|
|
|
/* Update the table selection before showing menu
|
|
|
|
Preserves the selection if the row under the mouse is selected (to allow for
|
|
|
|
multiple items to be selected), otherwise selects the row under the mouse */
|
2008-02-16 13:13:21 -03:00
|
|
|
BOOL currentRowIsSelected = [[self selectedRowIndexes] containsIndex:iRow];
|
2007-05-23 07:08:56 -04:00
|
|
|
if (!currentRowIsSelected) {
|
2008-02-16 13:13:21 -03:00
|
|
|
if (iRow == -1)
|
2007-05-23 07:08:56 -04:00
|
|
|
{
|
|
|
|
[self deselectAll:self];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-10-03 05:00:58 -03:00
|
|
|
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:iRow] byExtendingSelection:NO];
|
2007-05-23 07:08:56 -04:00
|
|
|
}
|
|
|
|
}
|
2007-07-10 21:20:32 -04:00
|
|
|
|
2006-05-23 11:12:24 -04:00
|
|
|
if ([self numberOfSelectedRows] <=0)
|
|
|
|
{
|
|
|
|
//No rows are selected, so the table should be displayed with all items disabled
|
|
|
|
int i;
|
2007-05-23 07:08:56 -04:00
|
|
|
for (i=0;i<[tableViewMenu numberOfItems];i++) {
|
2006-05-23 11:12:24 -04:00
|
|
|
[[tableViewMenu itemAtIndex:i] setEnabled:NO];
|
2007-05-23 07:08:56 -04:00
|
|
|
}
|
2006-05-23 11:12:24 -04:00
|
|
|
}
|
2008-02-16 13:13:21 -03:00
|
|
|
|
2008-03-11 20:31:19 -03:00
|
|
|
return tableViewMenu;
|
2006-05-23 11:12:24 -04:00
|
|
|
}
|
|
|
|
|
2005-06-02 14:16:43 -04:00
|
|
|
- (void)keyDown:(NSEvent *)e
|
|
|
|
{
|
2008-02-10 13:16:45 -03:00
|
|
|
unsigned int modifiers = [e modifierFlags] & (NSCommandKeyMask | NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask);
|
|
|
|
NSString *characters = [e characters];
|
|
|
|
unichar c;
|
2007-07-10 21:20:32 -04:00
|
|
|
|
2008-02-10 13:16:45 -03:00
|
|
|
if ([characters length] != 1)
|
|
|
|
{
|
2007-05-26 10:09:03 -04:00
|
|
|
[super keyDown:e];
|
2005-06-02 14:16:43 -04:00
|
|
|
|
|
|
|
return;
|
2007-05-26 10:09:03 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
c = [characters characterAtIndex:0];
|
|
|
|
if (modifiers == 0 && (c == NSDeleteCharacter || c == NSBackspaceCharacter || c == NSDeleteFunctionKey))
|
2005-06-02 14:16:43 -04:00
|
|
|
{
|
|
|
|
[playlistController remove:self];
|
|
|
|
}
|
2007-05-26 10:09:03 -04:00
|
|
|
else if (modifiers == 0 && c == ' ')
|
2005-06-02 14:16:43 -04:00
|
|
|
{
|
2006-01-20 12:22:03 -03:00
|
|
|
[playbackController playPauseResume:self];
|
2005-06-02 14:16:43 -04:00
|
|
|
}
|
2007-05-26 10:09:03 -04:00
|
|
|
else if (modifiers == 0 && (c == NSEnterCharacter || c == NSCarriageReturnCharacter))
|
2005-06-02 14:16:43 -04:00
|
|
|
{
|
2006-01-20 12:22:03 -03:00
|
|
|
[playbackController play:self];
|
2005-06-02 14:16:43 -04:00
|
|
|
}
|
2018-09-27 00:30:02 -03:00
|
|
|
else if (modifiers == 0 && c == NSLeftArrowFunctionKey)
|
|
|
|
{
|
|
|
|
[playbackController eventSeekBackward:self];
|
|
|
|
}
|
|
|
|
else if (modifiers == 0 && c == NSRightArrowFunctionKey)
|
|
|
|
{
|
|
|
|
[playbackController eventSeekForward:self];
|
|
|
|
}
|
2008-02-10 13:16:45 -03:00
|
|
|
// Escape
|
|
|
|
else if (modifiers == 0 && c == 0x1b)
|
|
|
|
{
|
2007-05-26 10:09:03 -04:00
|
|
|
[playlistController clearFilterPredicate:self];
|
|
|
|
}
|
2005-06-02 14:16:43 -04:00
|
|
|
else
|
|
|
|
{
|
|
|
|
[super keyDown:e];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-05-26 10:09:03 -04:00
|
|
|
- (IBAction)scrollToCurrentEntry:(id)sender
|
|
|
|
{
|
2008-02-23 19:20:14 -03:00
|
|
|
[self scrollRowToVisible:[[playlistController currentEntry] index]];
|
2013-10-03 05:00:58 -03:00
|
|
|
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:[[playlistController currentEntry] index]] byExtendingSelection:NO];
|
2007-05-26 10:09:03 -04:00
|
|
|
}
|
|
|
|
|
2008-02-10 14:13:30 -03:00
|
|
|
- (IBAction)undo:(id)sender
|
|
|
|
{
|
|
|
|
[[playlistController undoManager] undo];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (IBAction)redo:(id)sender
|
|
|
|
{
|
|
|
|
[[playlistController undoManager] redo];
|
|
|
|
}
|
|
|
|
|
2013-10-13 02:08:34 -03:00
|
|
|
- (IBAction)copy:(id)sender
|
|
|
|
{
|
|
|
|
NSPasteboard *pboard = [NSPasteboard generalPasteboard];
|
|
|
|
|
|
|
|
[pboard clearContents];
|
|
|
|
|
|
|
|
NSMutableArray *selectedURLs = [[NSMutableArray alloc] init];
|
|
|
|
|
|
|
|
for (PlaylistEntry *pe in [[playlistController content] objectsAtIndexes:[playlistController selectionIndexes]])
|
|
|
|
{
|
|
|
|
[selectedURLs addObject:[pe URL]];
|
|
|
|
}
|
|
|
|
|
|
|
|
[pboard setData:[NSArchiver archivedDataWithRootObject:selectedURLs] forType:CogUrlsPboardType];
|
|
|
|
|
|
|
|
NSMutableDictionary * tracks = [[NSMutableDictionary alloc] init];
|
|
|
|
|
|
|
|
unsigned long i = 0;
|
|
|
|
for (NSURL *url in selectedURLs)
|
|
|
|
{
|
|
|
|
NSMutableDictionary * track = [NSMutableDictionary dictionaryWithObjectsAndKeys:[url absoluteString], @"Location", nil];
|
|
|
|
[tracks setObject:track forKey:[NSString stringWithFormat:@"%lu", i]];
|
|
|
|
++i;
|
|
|
|
}
|
|
|
|
|
|
|
|
NSMutableDictionary * itunesPlist = [NSMutableDictionary dictionaryWithObjectsAndKeys:tracks, @"Tracks", nil];
|
|
|
|
|
|
|
|
[pboard setPropertyList:itunesPlist forType:iTunesDropType];
|
|
|
|
|
|
|
|
NSMutableArray *filePaths = [[NSMutableArray alloc] init];
|
|
|
|
|
|
|
|
for (NSURL *url in selectedURLs)
|
|
|
|
{
|
|
|
|
if ([url isFileURL])
|
|
|
|
[filePaths addObject:[url path]];
|
|
|
|
}
|
|
|
|
|
|
|
|
if ([filePaths count])
|
|
|
|
[pboard setPropertyList:filePaths forType:NSFilenamesPboardType];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (IBAction)cut:(id)sender
|
|
|
|
{
|
|
|
|
[self copy:sender];
|
|
|
|
|
|
|
|
[playlistController removeObjectsAtArrangedObjectIndexes:[playlistController selectionIndexes]];
|
|
|
|
|
|
|
|
if ([playlistController shuffle] != ShuffleOff)
|
|
|
|
[playlistController resetShuffleList];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (IBAction)paste:(id)sender
|
|
|
|
{
|
|
|
|
// Determine the type of object that was dropped
|
|
|
|
NSArray *supportedTypes = [NSArray arrayWithObjects:CogUrlsPboardType, NSFilenamesPboardType, iTunesDropType, nil];
|
|
|
|
NSPasteboard *pboard = [NSPasteboard generalPasteboard];
|
|
|
|
NSString *bestType = [pboard availableTypeFromArray:supportedTypes];
|
|
|
|
|
|
|
|
NSMutableArray *acceptedURLs = [[NSMutableArray alloc] init];
|
|
|
|
|
|
|
|
// Get files from an file drawer drop
|
|
|
|
if ([bestType isEqualToString:CogUrlsPboardType]) {
|
|
|
|
NSArray *urls = [NSUnarchiver unarchiveObjectWithData:[pboard dataForType:CogUrlsPboardType]];
|
|
|
|
DLog(@"URLS: %@", urls);
|
|
|
|
//[playlistLoader insertURLs: urls atIndex:row sort:YES];
|
|
|
|
[acceptedURLs addObjectsFromArray:urls];
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get files from a normal file drop (such as from Finder)
|
|
|
|
if ([bestType isEqualToString:NSFilenamesPboardType]) {
|
|
|
|
NSMutableArray *urls = [[NSMutableArray alloc] init];
|
|
|
|
|
|
|
|
for (NSString *file in [pboard propertyListForType:NSFilenamesPboardType])
|
|
|
|
{
|
|
|
|
[urls addObject:[NSURL fileURLWithPath:file]];
|
|
|
|
}
|
|
|
|
|
|
|
|
//[playlistLoader insertURLs:urls atIndex:row sort:YES];
|
|
|
|
[acceptedURLs addObjectsFromArray:urls];
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get files from an iTunes drop
|
|
|
|
if ([bestType isEqualToString:iTunesDropType]) {
|
|
|
|
NSDictionary *iTunesDict = [pboard propertyListForType:iTunesDropType];
|
|
|
|
NSDictionary *tracks = [iTunesDict valueForKey:@"Tracks"];
|
|
|
|
|
|
|
|
// Convert the iTunes URLs to URLs....MWAHAHAH!
|
|
|
|
NSMutableArray *urls = [[NSMutableArray alloc] init];
|
|
|
|
|
|
|
|
for (NSDictionary *trackInfo in [tracks allValues]) {
|
|
|
|
[urls addObject:[NSURL URLWithString:[trackInfo valueForKey:@"Location"]]];
|
|
|
|
}
|
|
|
|
|
|
|
|
//[playlistLoader insertURLs:urls atIndex:row sort:YES];
|
|
|
|
[acceptedURLs addObjectsFromArray:urls];
|
|
|
|
}
|
|
|
|
|
|
|
|
if ([acceptedURLs count])
|
|
|
|
{
|
|
|
|
NSUInteger row = [[playlistController content] count];
|
|
|
|
|
|
|
|
[playlistController willInsertURLs:acceptedURLs origin:URLOriginInternal];
|
|
|
|
|
2016-06-30 01:10:29 -04:00
|
|
|
NSArray* entries = [playlistLoader insertURLs:acceptedURLs atIndex:(int)row sort:NO];
|
2013-10-13 02:08:34 -03:00
|
|
|
[playlistLoader didInsertURLs:entries origin:URLOriginInternal];
|
|
|
|
|
|
|
|
if ([playlistController shuffle] != ShuffleOff)
|
|
|
|
[playlistController resetShuffleList];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- (IBAction)delete:(id)sender
|
|
|
|
{
|
|
|
|
[playlistController removeObjectsAtArrangedObjectIndexes:[playlistController selectionIndexes]];
|
|
|
|
}
|
|
|
|
|
2008-02-10 16:35:58 -03:00
|
|
|
|
|
|
|
-(BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem
|
2008-02-10 14:13:30 -03:00
|
|
|
{
|
2008-02-10 16:35:58 -03:00
|
|
|
SEL action = [anItem action];
|
2008-02-10 14:13:30 -03:00
|
|
|
|
2008-02-10 17:32:46 -03:00
|
|
|
if (action == @selector(undo:))
|
|
|
|
{
|
|
|
|
if ([[playlistController undoManager] canUndo])
|
|
|
|
return YES;
|
|
|
|
else
|
|
|
|
return NO;
|
|
|
|
}
|
|
|
|
if (action == @selector(redo:))
|
|
|
|
{
|
|
|
|
if ([[playlistController undoManager] canRedo])
|
|
|
|
return YES;
|
|
|
|
else
|
|
|
|
return NO;
|
|
|
|
}
|
2013-10-13 02:08:34 -03:00
|
|
|
if (action == @selector(cut:) || action == @selector(copy:) || action == @selector(delete:))
|
|
|
|
{
|
|
|
|
if ([[playlistController selectionIndexes] count] == 0)
|
|
|
|
return NO;
|
|
|
|
else
|
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
if (action == @selector(paste:))
|
|
|
|
{
|
|
|
|
NSPasteboard *pboard = [NSPasteboard generalPasteboard];
|
|
|
|
|
|
|
|
NSArray *supportedTypes = [NSArray arrayWithObjects:CogUrlsPboardType, NSFilenamesPboardType, iTunesDropType, nil];
|
|
|
|
|
|
|
|
NSString *bestType = [pboard availableTypeFromArray:supportedTypes];
|
|
|
|
|
|
|
|
if (bestType != nil)
|
|
|
|
return YES;
|
|
|
|
else
|
|
|
|
return NO;
|
|
|
|
}
|
2008-02-23 19:20:14 -03:00
|
|
|
|
2021-01-06 07:18:09 -03:00
|
|
|
if (action == @selector(scrollToCurrentEntry:) && (([playbackController playbackStatus] == kCogStatusStopped) || ([playbackController playbackStatus] == kCogStatusStopping)))
|
2008-02-23 19:20:14 -03:00
|
|
|
return NO;
|
|
|
|
|
2008-02-10 16:35:58 -03:00
|
|
|
return [super validateUserInterfaceItem:anItem];
|
2008-02-10 14:13:30 -03:00
|
|
|
}
|
|
|
|
|
2018-06-28 06:59:59 -04:00
|
|
|
#if 0
|
2008-02-24 12:47:04 -03:00
|
|
|
- (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal
|
|
|
|
{
|
|
|
|
if (isLocal)
|
|
|
|
return NSDragOperationNone;
|
|
|
|
else
|
|
|
|
return NSDragOperationCopy;
|
|
|
|
}
|
2018-06-28 06:59:59 -04:00
|
|
|
#endif
|
2008-02-24 12:47:04 -03:00
|
|
|
|
2008-03-03 22:14:51 -03:00
|
|
|
|
2005-06-02 14:16:43 -04:00
|
|
|
@end
|