@property (nonatomic) BOOL visible;
/// Queue progress info
-@property (nonatomic, copy) NSAttributedString *progressInfo;
+@property (nonatomic, copy) NSString *progressInfo;
@property (nonatomic) double progress;
@property (nonatomic, readwrite) NSColor *labelColor;
_scanSpecificTitleIdx = 1;
// Progress
- _progressInfo = [[NSAttributedString alloc] initWithString:@""];
+ _progressInfo = @"";
// Check to see if the last destination has been set, use if so, if not, use Movies
#ifdef __SANDBOX_ENABLED__
[self enableUI:NO];
// Bottom
+ fStatusField.font = [NSFont monospacedDigitSystemFontOfSize:NSFont.smallSystemFontSize weight:NSFontWeightRegular];
fRipIndicator.hidden = YES;
[self updateProgress];
{
info = note.userInfo[HBQueueProgressNotificationInfoKey];
}
- self.progressInfo = info.HB_smallMonospacedString;
+ self.progressInfo = info;
self.progress = [note.userInfo[HBQueueProgressNotificationPercentKey] doubleValue];
if (self->_visible)
- (void)updateProgress
{
- fStatusField.attributedStringValue = self.progressInfo;
+ fStatusField.stringValue = self.progressInfo;
fRipIndicator.doubleValue = self.progress;
}
- (void)setUpObservers
{
+ // It would be easier to just KVO the item state property,
+ // But we can't because the item is a NSProxy.
NSNotificationCenter * __weak center = NSNotificationCenter.defaultCenter;
[center addObserverForName:HBQueueDidStartItemNotification
[self updateReset];
}
}];
+
+ [center addObserverForName:HBQueueDidChangeItemNotification
+ object:nil
+ queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note)
+ {
+ [self updateLabels];
+ [self updateReset];
+ }];
+
}
- (void)updateReset
NSString *progressInfo = note.userInfo[HBQueueProgressNotificationInfoKey];
double progress = [note.userInfo[HBQueueProgressNotificationPercentKey] doubleValue];
- self.progressField.attributedStringValue = progressInfo.HB_smallMonospacedString;
+ self.progressField.stringValue = progressInfo;
self.progressBar.doubleValue = progress;
}];
[self removeObservers];
}
}];
+
+ self.progressField.font = [NSFont monospacedDigitSystemFontOfSize:NSFont.smallSystemFontSize weight:NSFontWeightRegular];
}
- (void)removeObservers