<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.59" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.59"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="50" translatesAutoresizingMaskIntoConstraints="NO" id="Pai-3Q-Gs3">
<rect key="frame" x="521" y="282" width="11" height="14"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="0" id="bvD-W7-O0N">
- <numberFormatter key="formatter" formatterBehavior="default10_4" localizesFormat="NO" numberStyle="decimal" minimumIntegerDigits="1" maximumIntegerDigits="309" maximumFractionDigits="3" id="efn-Vj-Jp7"/>
+ <numberFormatter key="formatter" formatterBehavior="default10_4" numberStyle="decimal" minimumIntegerDigits="1" maximumIntegerDigits="2000000000" maximumFractionDigits="3" id="wYW-16-bWA"/>
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
- (IBAction)addToQueue:(id)sender;
- (IBAction)addAllTitlesToQueue:(id)sender;
-- (void)setQueueInfo:(NSString *)info progress:(double)progress hidden:(BOOL)hidden;
+- (void)setQueueInfo:(NSAttributedString *)info progress:(double)progress hidden:(BOOL)hidden;
- (IBAction)rip:(id)sender;
- (IBAction)pause:(id)sender;
@property (nonatomic) BOOL visible;
/// Queue progress info
-@property (nonatomic, copy) NSString *progressInfo;
+@property (nonatomic, copy) NSAttributedString *progressInfo;
@property (nonatomic) double progress;
@property (nonatomic, readwrite) NSColor *labelColor;
_scanSpecificTitleIdx = 1;
// Progress
- _progressInfo = @"";
+ _progressInfo = [[NSAttributedString alloc] initWithString:@""];
// Check to see if the last destination has been set, use if so, if not, use Movies
#ifdef __SANDBOX_ENABLED__
- (void)updateProgress
{
- fStatusField.stringValue = self.progressInfo;
+ fStatusField.attributedStringValue = self.progressInfo;
fRipIndicator.doubleValue = self.progress;
}
-- (void)setQueueInfo:(NSString *)info progress:(double)progress hidden:(BOOL)hidden
+- (void)setQueueInfo:(NSAttributedString *)info progress:(double)progress hidden:(BOOL)hidden
{
self.progressInfo = info;
self.progress = progress;
{
sharpenTypesDict = @{HBKitLocalizedString(@"Off", @"HBFilters -> filter display name"): @"off",
HBKitLocalizedString(@"Unsharp", @"HBFilters -> filter display name"): @"unsharp",
- HBKitLocalizedString(@"Lapsharp", @"HBFilters -> filter display name"): @"lapsharp"};;
+ HBKitLocalizedString(@"Lapsharp", @"HBFilters -> filter display name"): @"lapsharp"};
}
return sharpenTypesDict;
}
@property (nonatomic) BOOL visible;
// Progress
-@property (nonatomic, strong) NSString *progressInfo;
+@property (nonatomic, strong) NSAttributedString *progressInfo;
+@property (nonatomic, strong) NSDictionary *monospacedAttr;
@property (nonatomic, readonly) HBDockTile *dockTile;
@property (nonatomic, readwrite) double dockIconProgress;
_core.automaticallyPreventSleep = NO;
// Progress
- _progressInfo = @"";
+ _monospacedAttr = @{NSFontAttributeName: [NSFont monospacedDigitSystemFontOfSize:[NSFont smallSystemFontSize] weight:NSFontWeightRegular]};
+ _progressInfo = [[NSAttributedString alloc] initWithString:@""];
// Load the queue from disk.
_items = [[HBDistributedArray alloc] initWithURL:queueURL class:[HBQueueItem class]];
if ([self.window occlusionState] & NSWindowOcclusionStateVisible)
{
self.visible = YES;
- self.progressTextField.stringValue = self.progressInfo;
+ self.progressTextField.attributedStringValue = self.progressInfo;
}
else
{
- (void)updateProgress:(NSString *)info progress:(double)progress hidden:(BOOL)hidden
{
- self.progressInfo = info;
+ self.progressInfo = [[NSAttributedString alloc] initWithString:info attributes:_monospacedAttr];
if (self.visible)
{
- self.progressTextField.stringValue = info;
+ self.progressTextField.attributedStringValue = _progressInfo;
}
- [self.controller setQueueInfo:info progress:progress hidden:hidden];
+ [self.controller setQueueInfo:_progressInfo progress:progress hidden:hidden];
}
/**
case HB_STATE_SEARCHING:
{
- [string appendFormat:
- HBKitLocalizedString(@"Searching for start point: %.2f %%", @"HBStateFormatter -> search pass display name"),
+ NSString *desc = [NSString localizedStringWithFormat:HBKitLocalizedString(@"Searching for start point: %.2f %%", @"HBStateFormatter -> search pass display name"),
100.0 * p.progress];
+ [string appendString:desc];
if (p.seconds > -1)
{
- [string appendFormat:HBKitLocalizedString(@" (ETA %02d:%02d:%02d)", @"HBStateFormatter -> search time format"), p.hours, p.minutes, p.seconds];
+ NSString *eta = [NSString stringWithFormat:@"%02d:%02d:%02d", p.hours, p.minutes, p.seconds];
+ [string appendFormat:HBKitLocalizedString(@" (ETA %@)", @"HBStateFormatter -> search time format"), eta];
}
break;
{
if (p.pass_id == HB_PASS_SUBTITLE)
{
- [string appendFormat:
- HBKitLocalizedString(@"Pass %d %@ of %d, %.2f %%", @"HBStateFormatter -> work pass number format"),
- p.pass,
- HBKitLocalizedString(@"(subtitle scan)", @"HBStateFormatter -> work pass type format"),
- p.pass_count, 100.0 * p.progress];
+ NSString *desc = [NSString localizedStringWithFormat:HBKitLocalizedString(@"Pass %d %@ of %d, %.2f %%", @"HBStateFormatter -> work pass number format"),
+ p.pass,
+ HBKitLocalizedString(@"(subtitle scan)", @"HBStateFormatter -> work pass type format"),
+ p.pass_count, 100.0 * p.progress];
+ [string appendString:desc];
}
else
{
- [string appendFormat:
- HBKitLocalizedString(@"Pass %d of %d, %.2f %%", @"HBStateFormatter -> work pass number format"),
- p.pass, p.pass_count, 100.0 * p.progress];
+ NSString *desc = [NSString localizedStringWithFormat:HBKitLocalizedString(@"Pass %d of %d, %.2f %%", @"HBStateFormatter -> work pass number format"),
+ p.pass, p.pass_count, 100.0 * p.progress];
+ [string appendString:desc];
}
}
if (p.seconds > -1)
{
+ NSString *eta = [NSString stringWithFormat:@"%02d:%02d:%02d", p.hours, p.minutes, p.seconds];
+
if (p.rate_cur > 0.0)
{
- [string appendFormat:
- HBKitLocalizedString(@" (%.2f fps, avg %.2f fps, ETA %02d:%02d:%02d)", @"HBStateFormatter -> work time format"),
- p.rate_cur, p.rate_avg, p.hours, p.minutes, p.seconds];
+ NSString *desc = [NSString localizedStringWithFormat:HBKitLocalizedString(@" (%.2f fps, avg %.2f fps, ETA %@)", @"HBStateFormatter -> work time format"),
+ p.rate_cur, p.rate_avg, eta];
+ [string appendString:desc];
+
}
else
{
- [string appendFormat:
- HBKitLocalizedString(@" (ETA %02d:%02d:%02d)", @"HBStateFormatter -> work time format"),
- p.hours, p.minutes, p.seconds];
+ NSString *desc = [NSString localizedStringWithFormat:HBKitLocalizedString(@" (ETA %@)", @"HBStateFormatter -> work time format"),
+ eta];
+ [string appendString:desc];
}
}