Smalls changes. Linked the edit button to its IBAction.
This commit is contained in:
1 parent
ff5ac492a0
commit
151d9c07f8
8 files changed
+161
-114
No files matched your search
@@ -11,7 +11,7 @@
|
|||||||
@class SBQueueItem;
|
@class SBQueueItem;
|
||||||
|
|
||||||
@interface SBItemViewController : NSViewController {
|
@interface SBItemViewController : NSViewController {
|
||||||
@private
|
@private
|
||||||
SBQueueItem *_item;
|
SBQueueItem *_item;
|
||||||
|
|
||||||
NSTextField *_nameLabel;
|
NSTextField *_nameLabel;
|
||||||
@@ -19,8 +19,13 @@
|
|||||||
NSTextField *_destinationLabel;
|
NSTextField *_destinationLabel;
|
||||||
|
|
||||||
NSTextField *_actionsLabel;
|
NSTextField *_actionsLabel;
|
||||||
|
|
||||||
|
id _delegate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@property (nonatomic, readonly) SBQueueItem *item;
|
||||||
|
@property (nonatomic, assign, readwrite) id delegate;
|
||||||
|
|
||||||
- (instancetype)initWithItem:(SBQueueItem *)item;
|
- (instancetype)initWithItem:(SBQueueItem *)item;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@@ -7,7 +7,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "SBItemViewController.h"
|
#import "SBItemViewController.h"
|
||||||
|
|
||||||
#import "SBQueueItem.h"
|
#import "SBQueueItem.h"
|
||||||
|
#import "SBQueueController.h"
|
||||||
|
|
||||||
@interface SBItemViewController ()
|
@interface SBItemViewController ()
|
||||||
|
|
||||||
@@ -24,6 +26,7 @@
|
|||||||
@implementation SBItemViewController
|
@implementation SBItemViewController
|
||||||
|
|
||||||
@synthesize item = _item;
|
@synthesize item = _item;
|
||||||
|
@synthesize delegate = _delegate;
|
||||||
|
|
||||||
@synthesize nameLabel = _nameLabel;
|
@synthesize nameLabel = _nameLabel;
|
||||||
@synthesize sourceLabel = _sourceLabel;
|
@synthesize sourceLabel = _sourceLabel;
|
||||||
@@ -67,6 +70,14 @@
|
|||||||
[self.view setFrameSize:frameSize];
|
[self.view setFrameSize:frameSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (IBAction)edit:(id)sender {
|
||||||
|
[sender setEnabled:NO];
|
||||||
|
|
||||||
|
if ([self.delegate respondsToSelector:@selector(editItem:)]) {
|
||||||
|
[self.delegate performSelector:@selector(editItem:) withObject:self.item];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
[_item release];
|
[_item release];
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
@interface SBOptionsViewController : NSViewController {
|
@interface SBOptionsViewController : NSViewController {
|
||||||
@private
|
@private
|
||||||
IBOutlet NSPopUpButton *_destButton;
|
IBOutlet NSPopUpButton *_destButton;
|
||||||
IBOutlet NSPopUpButton *_setsPopup;
|
IBOutlet NSPopUpButton *_setsPopup;
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@interface SBQueueSetAction : NSObject <SBQueueActionProtocol> {
|
@interface SBQueueSetAction : NSObject <SBQueueActionProtocol> {
|
||||||
|
@private
|
||||||
MP42Metadata *_set;
|
MP42Metadata *_set;
|
||||||
}
|
}
|
||||||
- (id)initWithSet:(MP42Metadata *)set;
|
- (id)initWithSet:(MP42Metadata *)set;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
@class MP42File;
|
@class MP42File;
|
||||||
|
|
||||||
@interface SBQueueController : NSWindowController {
|
@interface SBQueueController : NSWindowController {
|
||||||
|
@private
|
||||||
IBOutlet NSButton *_start;
|
IBOutlet NSButton *_start;
|
||||||
IBOutlet NSButton *_open;
|
IBOutlet NSButton *_open;
|
||||||
|
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
+ (SBQueueController *)sharedManager;
|
+ (SBQueueController *)sharedManager;
|
||||||
|
|
||||||
- (void)addItem:(SBQueueItem *)item;
|
- (void)addItem:(SBQueueItem *)item;
|
||||||
|
- (void)editItem:(SBQueueItem *)item;
|
||||||
|
|
||||||
- (BOOL)saveQueueToDisk;
|
- (BOOL)saveQueueToDisk;
|
||||||
|
|
||||||
|
|||||||
+136
-112
@@ -24,11 +24,11 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
#define SublerBatchTableViewDataType @"SublerBatchTableViewDataType"
|
#define SublerBatchTableViewDataType @"SublerBatchTableViewDataType"
|
||||||
#define kOptionsPanelHeight 88
|
#define kOptionsPanelHeight 88
|
||||||
|
|
||||||
@interface SBQueueController () <NSPopoverDelegate, NSTableViewDelegate, NSTableViewDataSource, SBTableViewDelegate>
|
@interface SBQueueController () <NSPopoverDelegate, NSWindowDelegate, NSTableViewDelegate, NSTableViewDataSource, SBTableViewDelegate>
|
||||||
|
|
||||||
@property (readonly) SBQueue *queue;
|
@property (nonatomic, readonly) SBQueue *queue;
|
||||||
@property NSPopover *popover;
|
@property (nonatomic, retain) NSPopover *popover;
|
||||||
@property NSPopover *itemPopover;
|
@property (nonatomic, retain) NSPopover *itemPopover;
|
||||||
|
|
||||||
@property NSMutableDictionary *options;
|
@property NSMutableDictionary *options;
|
||||||
|
|
||||||
@@ -202,6 +202,8 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark - Queue methods
|
||||||
|
|
||||||
- (SBQueueStatus)status {
|
- (SBQueueStatus)status {
|
||||||
return self.queue.status;
|
return self.queue.status;
|
||||||
}
|
}
|
||||||
@@ -211,6 +213,116 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
return [self.queue saveQueueToDisk];
|
return [self.queue saveQueueToDisk];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)editItem:(SBQueueItem *)item {
|
||||||
|
item.status = SBQueueItemStatusEditing;
|
||||||
|
[self updateUI];
|
||||||
|
|
||||||
|
dispatch_async(dispatch_get_global_queue(0, 0), ^{
|
||||||
|
if (!item.mp4File)
|
||||||
|
[item prepareItem:NULL];
|
||||||
|
|
||||||
|
MP42File *mp4 = item.mp4File;
|
||||||
|
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||||
|
SBDocument *doc = [[NSDocumentController sharedDocumentController] openUntitledDocumentAndDisplay:YES error:NULL];
|
||||||
|
[doc setMp4File:mp4];
|
||||||
|
|
||||||
|
[self.itemPopover close];
|
||||||
|
|
||||||
|
[self removeItems:[NSArray arrayWithObject:item]];
|
||||||
|
[self updateUI];
|
||||||
|
});
|
||||||
|
|
||||||
|
[item release];
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Queue items creation
|
||||||
|
|
||||||
|
- (SBQueueItem *)createItemWithURL:(NSURL *)url {
|
||||||
|
SBQueueItem *item = [SBQueueItem itemWithURL:url];
|
||||||
|
|
||||||
|
if ([[self.options objectForKey:@"SBQueueMetadata"] boolValue]) {
|
||||||
|
[item addAction:[[[SBQueueMetadataAction alloc] init] autorelease]];
|
||||||
|
[item addAction:[[[SBQueueSubtitlesAction alloc] init] autorelease]];
|
||||||
|
}
|
||||||
|
if ([[self.options objectForKey:@"SBQueueOrganize"] boolValue]) {
|
||||||
|
[item addAction:[[[SBQueueOrganizeGroupsAction alloc] init] autorelease]];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ([self.options objectForKey:@"SBQueueSet"]) {
|
||||||
|
[item addAction:[[[SBQueueSetAction alloc] initWithSet:[self.options objectForKey:@"SBQueueSet"]] autorelease]];
|
||||||
|
}
|
||||||
|
|
||||||
|
NSURL *destination = [self.options objectForKey:@"SBQueueDestination"];
|
||||||
|
if (destination) {
|
||||||
|
destination = [[[destination URLByAppendingPathComponent:[url lastPathComponent]] URLByDeletingPathExtension] URLByAppendingPathExtension:fileType];
|
||||||
|
} else {
|
||||||
|
destination = [[url URLByDeletingPathExtension] URLByAppendingPathExtension:fileType];
|
||||||
|
}
|
||||||
|
|
||||||
|
item.destURL = destination;
|
||||||
|
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)addItem:(SBQueueItem *)item {
|
||||||
|
[self addItems:[NSArray arrayWithObject:item] atIndexes:nil];
|
||||||
|
[self updateUI];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)addItems:(NSArray *)items atIndexes:(NSIndexSet *)indexes; {
|
||||||
|
NSMutableIndexSet *mutableIndexes = [indexes mutableCopy];
|
||||||
|
if ([indexes count] == [items count]) {
|
||||||
|
for (id item in [items reverseObjectEnumerator]) {
|
||||||
|
[self.queue insertItem:item atIndex:[mutableIndexes firstIndex]];
|
||||||
|
[mutableIndexes removeIndexesInRange:NSMakeRange(0, 1)];
|
||||||
|
}
|
||||||
|
} else if ([indexes count] == 1) {
|
||||||
|
for (id item in [items reverseObjectEnumerator]) {
|
||||||
|
[self.queue insertItem:item atIndex:[mutableIndexes firstIndex]];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (id item in [items reverseObjectEnumerator]) {
|
||||||
|
[self.queue addItem:item];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NSUndoManager *undo = [[self window] undoManager];
|
||||||
|
[[undo prepareWithInvocationTarget:self] removeItems:items];
|
||||||
|
|
||||||
|
if (![undo isUndoing]) {
|
||||||
|
[undo setActionName:@"Add Queue Item"];
|
||||||
|
}
|
||||||
|
if ([undo isUndoing] || [undo isRedoing])
|
||||||
|
[self updateUI];
|
||||||
|
|
||||||
|
if ([[self.options objectForKey:@"SBQueueAutoStart"] boolValue])
|
||||||
|
[self start:self];
|
||||||
|
|
||||||
|
[mutableIndexes release];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)removeItems:(NSArray *)items {
|
||||||
|
NSMutableIndexSet *indexes = [[NSMutableIndexSet alloc] init];
|
||||||
|
|
||||||
|
for (id item in items) {
|
||||||
|
[indexes addIndex:[self.queue indexOfItem:item]];
|
||||||
|
[self.queue removeItem:item];
|
||||||
|
}
|
||||||
|
|
||||||
|
NSUndoManager *undo = [[self window] undoManager];
|
||||||
|
[[undo prepareWithInvocationTarget:self] addItems:items atIndexes:indexes];
|
||||||
|
|
||||||
|
if (![undo isUndoing]) {
|
||||||
|
[undo setActionName:@"Delete Queue Item"];
|
||||||
|
}
|
||||||
|
if ([undo isUndoing] || [undo isRedoing])
|
||||||
|
[self updateUI];
|
||||||
|
|
||||||
|
[indexes release];
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - NSPopover delegate
|
#pragma mark - NSPopover delegate
|
||||||
|
|
||||||
- (void)createPopover {
|
- (void)createPopover {
|
||||||
@@ -234,11 +346,16 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)createItemPopover:(SBQueueItem *)item {
|
- (void)createItemPopover:(SBQueueItem *)item {
|
||||||
|
if (self.itemPopover) {
|
||||||
|
self.itemPopover = nil;
|
||||||
|
}
|
||||||
_itemPopover = [[NSPopover alloc] init];
|
_itemPopover = [[NSPopover alloc] init];
|
||||||
|
|
||||||
// the popover retains us and we retain the popover,
|
// the popover retains us and we retain the popover,
|
||||||
// we drop the popover whenever it is closed to avoid a cycle
|
// we drop the popover whenever it is closed to avoid a cycle
|
||||||
self.itemPopover.contentViewController = [[[SBItemViewController alloc] initWithItem:item] autorelease];
|
SBItemViewController *view = [[[SBItemViewController alloc] initWithItem:item] autorelease];
|
||||||
|
view.delegate = self;
|
||||||
|
self.itemPopover.contentViewController = view;
|
||||||
self.itemPopover.appearance = NSPopoverAppearanceMinimal;
|
self.itemPopover.appearance = NSPopoverAppearanceMinimal;
|
||||||
self.itemPopover.animates = YES;
|
self.itemPopover.animates = YES;
|
||||||
|
|
||||||
@@ -254,20 +371,20 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
- (NSWindow *)detachableWindowForPopover:(NSPopover *)popover {
|
- (NSWindow *)detachableWindowForPopover:(NSPopover *)popover {
|
||||||
if (popover == self.popover) {
|
if (popover == self.popover) {
|
||||||
_detachedWindow.contentView = [[SBOptionsViewController alloc] initWithOptions:self.options].view;
|
_detachedWindow.contentView = [[SBOptionsViewController alloc] initWithOptions:self.options].view;
|
||||||
|
_detachedWindow.delegate = self;
|
||||||
return _detachedWindow;
|
return _detachedWindow;
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)popoverDidClose:(NSNotification *)notification {
|
- (void)popoverDidClose:(NSNotification *)notification {
|
||||||
if (self.popover) {
|
NSPopover *closedPopover = [notification object];
|
||||||
self.popover.contentViewController = nil;
|
if (self.popover == closedPopover) {
|
||||||
self.popover = nil;
|
self.popover = nil;
|
||||||
}
|
}
|
||||||
/*if (self.itemPopover) {
|
if (self.itemPopover == closedPopover) {
|
||||||
self.itemPopover.contentViewController = nil;
|
|
||||||
self.itemPopover = nil;
|
self.itemPopover = nil;
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - UI methods
|
#pragma mark - UI methods
|
||||||
@@ -328,18 +445,20 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
[self.popover showRelativeToRect:[targetButton bounds] ofView:sender preferredEdge:NSMaxYEdge];
|
[self.popover showRelativeToRect:[targetButton bounds] ofView:sender preferredEdge:NSMaxYEdge];
|
||||||
} else {
|
} else {
|
||||||
[self.popover close];
|
[self.popover close];
|
||||||
|
self.popover = nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)toggleItemsOptions:(id)sender {
|
- (IBAction)toggleItemsOptions:(id)sender {
|
||||||
NSInteger clickedRow = [sender clickedRow];
|
NSInteger clickedRow = [sender clickedRow];
|
||||||
|
SBQueueItem *item = [self.queue itemAtIndex:clickedRow];
|
||||||
|
|
||||||
[self createItemPopover:[self.queue itemAtIndex:clickedRow]];
|
if (self.itemPopover.isShown && [(SBItemViewController *)self.itemPopover.contentViewController item] == item) {
|
||||||
|
|
||||||
if (!self.itemPopover.isShown) {
|
|
||||||
[self.itemPopover showRelativeToRect:[sender frameOfCellAtColumn:2 row:clickedRow] ofView:sender preferredEdge:NSMaxXEdge];
|
|
||||||
} else {
|
|
||||||
[self.itemPopover close];
|
[self.itemPopover close];
|
||||||
|
self.itemPopover = nil;
|
||||||
|
} else {
|
||||||
|
[self createItemPopover:[self.queue itemAtIndex:clickedRow]];
|
||||||
|
[self.itemPopover showRelativeToRect:[sender frameOfCellAtColumn:2 row:clickedRow] ofView:sender preferredEdge:NSMaxXEdge];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,7 +502,7 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
SBQueueItemStatus batchStatus = [[self.queue itemAtIndex:rowIndex] status];
|
SBQueueItemStatus batchStatus = [[self.queue itemAtIndex:rowIndex] status];
|
||||||
if (batchStatus == SBQueueItemStatusCompleted)
|
if (batchStatus == SBQueueItemStatusCompleted)
|
||||||
return [NSImage imageNamed:@"EncodeComplete"];
|
return [NSImage imageNamed:@"EncodeComplete"];
|
||||||
else if (batchStatus == SBQueueItemStatusWorking)
|
else if (batchStatus == SBQueueItemStatusWorking || batchStatus == SBQueueItemStatusEditing)
|
||||||
return [NSImage imageNamed:@"EncodeWorking"];
|
return [NSImage imageNamed:@"EncodeWorking"];
|
||||||
else if (batchStatus == SBQueueItemStatusFailed)
|
else if (batchStatus == SBQueueItemStatusFailed)
|
||||||
return [NSImage imageNamed:@"EncodeCanceled"];
|
return [NSImage imageNamed:@"EncodeCanceled"];
|
||||||
@@ -439,19 +558,7 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
|
|
||||||
- (IBAction)edit:(id)sender {
|
- (IBAction)edit:(id)sender {
|
||||||
SBQueueItem *item = [[self.queue itemAtIndex:[_tableView clickedRow]] retain];
|
SBQueueItem *item = [[self.queue itemAtIndex:[_tableView clickedRow]] retain];
|
||||||
item.status = SBQueueItemStatusEditing;
|
[self editItem:item];
|
||||||
|
|
||||||
if (!item.mp4File)
|
|
||||||
[item prepareItem:NULL];
|
|
||||||
|
|
||||||
MP42File *mp4 = item.mp4File;
|
|
||||||
|
|
||||||
SBDocument *doc = [[NSDocumentController sharedDocumentController] openUntitledDocumentAndDisplay:YES error:NULL];
|
|
||||||
[doc setMp4File:mp4];
|
|
||||||
[item release];
|
|
||||||
|
|
||||||
[self removeItems:[NSArray arrayWithObject:item]];
|
|
||||||
[self updateUI];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)showInFinder:(id)sender {
|
- (IBAction)showInFinder:(id)sender {
|
||||||
@@ -597,87 +704,4 @@ static void *SBQueueContex = &SBQueueContex;
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (SBQueueItem *)createItemWithURL:(NSURL *)url {
|
|
||||||
SBQueueItem *item = [SBQueueItem itemWithURL:url];
|
|
||||||
|
|
||||||
if ([[self.options objectForKey:@"SBQueueMetadata"] boolValue]) {
|
|
||||||
[item addAction:[[[SBQueueMetadataAction alloc] init] autorelease]];
|
|
||||||
[item addAction:[[[SBQueueSubtitlesAction alloc] init] autorelease]];
|
|
||||||
}
|
|
||||||
if ([[self.options objectForKey:@"SBQueueOrganize"] boolValue]) {
|
|
||||||
[item addAction:[[[SBQueueOrganizeGroupsAction alloc] init] autorelease]];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ([self.options objectForKey:@"SBQueueSet"]) {
|
|
||||||
[item addAction:[[[SBQueueSetAction alloc] initWithSet:[self.options objectForKey:@"SBQueueSet"]] autorelease]];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NSURL *destination = [self.options objectForKey:@"SBQueueDestination"];
|
|
||||||
if (destination) {
|
|
||||||
destination = [[[destination URLByAppendingPathComponent:[url lastPathComponent]] URLByDeletingPathExtension] URLByAppendingPathExtension:fileType];
|
|
||||||
}
|
|
||||||
|
|
||||||
item.destURL = destination;
|
|
||||||
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)addItem:(SBQueueItem *)item {
|
|
||||||
[self addItems:[NSArray arrayWithObject:item] atIndexes:nil];
|
|
||||||
[self updateUI];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)addItems:(NSArray *)items atIndexes:(NSIndexSet *)indexes; {
|
|
||||||
NSMutableIndexSet *mutableIndexes = [indexes mutableCopy];
|
|
||||||
if ([indexes count] == [items count]) {
|
|
||||||
for (id item in [items reverseObjectEnumerator]) {
|
|
||||||
[self.queue insertItem:item atIndex:[mutableIndexes firstIndex]];
|
|
||||||
[mutableIndexes removeIndexesInRange:NSMakeRange(0, 1)];
|
|
||||||
}
|
|
||||||
} else if ([indexes count] == 1) {
|
|
||||||
for (id item in [items reverseObjectEnumerator]) {
|
|
||||||
[self.queue insertItem:item atIndex:[mutableIndexes firstIndex]];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (id item in [items reverseObjectEnumerator]) {
|
|
||||||
[self.queue addItem:item];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NSUndoManager *undo = [[self window] undoManager];
|
|
||||||
[[undo prepareWithInvocationTarget:self] removeItems:items];
|
|
||||||
|
|
||||||
if (![undo isUndoing]) {
|
|
||||||
[undo setActionName:@"Add Queue Item"];
|
|
||||||
}
|
|
||||||
if ([undo isUndoing] || [undo isRedoing])
|
|
||||||
[self updateUI];
|
|
||||||
|
|
||||||
if ([[self.options objectForKey:@"SBQueueAutoStart"] boolValue])
|
|
||||||
[self start:self];
|
|
||||||
|
|
||||||
[mutableIndexes release];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)removeItems:(NSArray *)items {
|
|
||||||
NSMutableIndexSet *indexes = [[NSMutableIndexSet alloc] init];
|
|
||||||
|
|
||||||
for (id item in items) {
|
|
||||||
[indexes addIndex:[self.queue indexOfItem:item]];
|
|
||||||
[self.queue removeItem:item];
|
|
||||||
}
|
|
||||||
|
|
||||||
NSUndoManager *undo = [[self window] undoManager];
|
|
||||||
[[undo prepareWithInvocationTarget:self] addItems:items atIndexes:indexes];
|
|
||||||
|
|
||||||
if (![undo isUndoing]) {
|
|
||||||
[undo setActionName:@"Delete Queue Item"];
|
|
||||||
}
|
|
||||||
if ([undo isUndoing] || [undo isRedoing])
|
|
||||||
[self updateUI];
|
|
||||||
|
|
||||||
[indexes release];
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@@ -23,6 +23,7 @@ typedef enum SBQueueItemStatus : NSInteger {
|
|||||||
} SBQueueItemStatus;
|
} SBQueueItemStatus;
|
||||||
|
|
||||||
@interface SBQueueItem : NSObject <NSCoding> {
|
@interface SBQueueItem : NSObject <NSCoding> {
|
||||||
|
@private
|
||||||
MP42File *_mp4File;
|
MP42File *_mp4File;
|
||||||
NSURL *_fileURL;
|
NSURL *_fileURL;
|
||||||
NSURL *_destURL;
|
NSURL *_destURL;
|
||||||
|
|||||||
@@ -90,6 +90,9 @@
|
|||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||||
<font key="font" metaFont="smallSystem"/>
|
<font key="font" metaFont="smallSystem"/>
|
||||||
</buttonCell>
|
</buttonCell>
|
||||||
|
<connections>
|
||||||
|
<action selector="edit:" target="-2" id="ZCT-Of-7Vv"/>
|
||||||
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
</subviews>
|
</subviews>
|
||||||
</customView>
|
</customView>
|
||||||
|
|||||||
Reference in new issue
Block a user