Simplify the queue window to use only one column.

This commit is contained in:
Damiano Galassi committed 2016-10-21 14:58:30 +02:00
1 parent 53be0cec62
commit bc456780ef
2 files changed
+20 -73

No files matched your search

+4 -11
View File
@@ -466,13 +466,13 @@ static void *SBQueueContex = &SBQueueContex;
* Updates the count on the app dock icon.
*/
- (void)updateDockTile {
NSUInteger count = [self.queue readyCount] + ((self.queue.status == SBQueueStatusWorking) ? 1 : 0);
NSUInteger count = self.queue.readyCount + ((self.queue.status == SBQueueStatusWorking) ? 1 : 0);
if (count) {
NSApp.dockTile.badgeLabel = [NSString stringWithFormat:@"%lu", (unsigned long)count];
}
else {
[NSApp.dockTile setBadgeLabel:nil];
NSApp.dockTile.badgeLabel = nil;
}
}
@@ -532,7 +532,7 @@ static void *SBQueueContex = &SBQueueContex;
}
else {
[self createItemPopover:item];
[self.itemPopover showRelativeToRect:[sender frame] ofView:sender preferredEdge:NSMaxXEdge];
[self.itemPopover showRelativeToRect:[sender bounds] ofView:sender preferredEdge:NSMaxXEdge];
}
}
@@ -577,12 +577,8 @@ static void *SBQueueContex = &SBQueueContex;
if ([tableColumn.identifier isEqualToString:@"nameColumn"]) {
cell = [tableView makeViewWithIdentifier:@"nameColumn" owner:self];
cell.textField.stringValue = item.fileURL.lastPathComponent;
}
else if ([tableColumn.identifier isEqualToString:@"statusColumn"]) {
cell = [tableView makeViewWithIdentifier:@"statusColumn" owner:self];
SBQueueItemStatus status = item.status;
switch (status) {
switch (item.status) {
case SBQueueItemStatusCompleted:
cell.imageView.image = [NSImage imageNamed:@"EncodeComplete"];
break;
@@ -599,9 +595,6 @@ static void *SBQueueContex = &SBQueueContex;
break;
}
}
else if ([tableColumn.identifier isEqualToString:@"actionColumn"]) {
cell = [tableView makeViewWithIdentifier:@"actionColumn" owner:self];
}
return cell;
}