summaryrefslogtreecommitdiffstats
path: root/macosx/HBQueueItemView.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-02-09 09:59:34 +0100
committerDamiano Galassi <[email protected]>2019-02-09 09:59:34 +0100
commit1728150b7e088eccc89f03ad03f9ea9dcb26cade (patch)
treec081f57de3a73482e6182ac320ad1c0f9ab3e8e7 /macosx/HBQueueItemView.m
parent8a111ad881c006ed8eec6b9f4b4f00f5c3659b8b (diff)
MacGui: fix queue table items expanded/collapsed state after an undo/redo.
Diffstat (limited to 'macosx/HBQueueItemView.m')
-rw-r--r--macosx/HBQueueItemView.m22
1 files changed, 10 insertions, 12 deletions
diff --git a/macosx/HBQueueItemView.m b/macosx/HBQueueItemView.m
index b6b8b80b1..d736fe59f 100644
--- a/macosx/HBQueueItemView.m
+++ b/macosx/HBQueueItemView.m
@@ -35,14 +35,14 @@
- (void)HB_updateLabel
{
- if (_expanded)
+ if (_item.expanded)
{
- self.textField.attributedStringValue = self.item.attributedDescription;
+ self.textField.attributedStringValue = _item.attributedDescription;
self.expandButton.state = NSOnState;
}
else
{
- self.textField.attributedStringValue = self.item.attributedTitleDescription;
+ self.textField.attributedStringValue = _item.attributedTitleDescription;
self.expandButton.state = NSOffState;
}
}
@@ -50,7 +50,7 @@
- (void)HB_updateState
{
NSImage *state = nil;
- switch (self.item.state) {
+ switch (_item.state) {
case HBQueueItemStateCompleted:
state = [NSImage imageNamed:@"EncodeComplete"];
break;
@@ -80,7 +80,7 @@
darkAqua = [self.effectiveAppearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameDarkAqua]] == NSAppearanceNameDarkAqua ? YES : NO;
}
- if (self.item.state == HBQueueItemStateCompleted)
+ if (_item.state == HBQueueItemStateCompleted)
{
[_removeButton setAction: @selector(revealQueueItem:)];
if (self.backgroundStyle == NSBackgroundStyleEmphasized)
@@ -117,15 +117,13 @@
- (void)expand
{
self.expandButton.state = NSOnState;
- self.expanded = YES;
- self.textField.attributedStringValue = self.item.attributedDescription;
+ self.textField.attributedStringValue = _item.attributedDescription;
}
- (void)collapse
{
self.expandButton.state = NSOffState;
- self.expanded = NO;
- self.textField.attributedStringValue = self.item.attributedTitleDescription;
+ self.textField.attributedStringValue = _item.attributedTitleDescription;
}
- (BOOL)isFlipped
@@ -140,17 +138,17 @@
- (IBAction)revealQueueItem:(id)sender
{
- [self.delegate revealQueueItem:self.item];
+ [self.delegate revealQueueItem:_item];
}
- (IBAction)removeQueueItem:(id)sender
{
- [self.delegate removeQueueItem:self.item];
+ [self.delegate removeQueueItem:_item];
}
- (IBAction)toggleHeight:(id)sender
{
- [self.delegate toggleQueueItemHeight:self.item];
+ [self.delegate toggleQueueItemHeight:_item];
}
@end