Info Inspector: Now displays ReplayGain info as tooltip for status text
parent
38e013e4ab
commit
8e5c62f185
|
@ -335,6 +335,7 @@
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
<connections>
|
<connections>
|
||||||
|
<binding destination="-2" name="toolTip" keyPath="valueToDisplay.gainInfo" id="BUp-Hu-Szq"/>
|
||||||
<binding destination="-2" name="value" keyPath="valueToDisplay.gainCorrection" id="JgZ-wN-peX"/>
|
<binding destination="-2" name="value" keyPath="valueToDisplay.gainCorrection" id="JgZ-wN-peX"/>
|
||||||
</connections>
|
</connections>
|
||||||
</textField>
|
</textField>
|
||||||
|
|
|
@ -153,6 +153,8 @@
|
||||||
|
|
||||||
@property(readonly) NSString *gainCorrection;
|
@property(readonly) NSString *gainCorrection;
|
||||||
|
|
||||||
|
@property(readonly) NSString *gainInfo;
|
||||||
|
|
||||||
@property double currentPosition;
|
@property double currentPosition;
|
||||||
|
|
||||||
@property(retain) NSString *endian;
|
@property(retain) NSString *endian;
|
||||||
|
|
|
@ -137,6 +137,11 @@
|
||||||
return [NSSet setWithObjects:@"replayGainAlbumGain", @"replayGainAlbumPeak", @"replayGainTrackGain", @"replayGainTrackPeak", @"volume", nil];
|
return [NSSet setWithObjects:@"replayGainAlbumGain", @"replayGainAlbumPeak", @"replayGainTrackGain", @"replayGainTrackPeak", @"volume", nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (NSSet *)keyPathsForValuesAffectingGainInfo
|
||||||
|
{
|
||||||
|
return [NSSet setWithObjects:@"replayGainAlbumGain", @"replayGainAlbumPeak", @"replayGainTrackGain", @"replayGainTrackPeak", @"volume", nil];
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString *)description
|
- (NSString *)description
|
||||||
{
|
{
|
||||||
return [NSString stringWithFormat:@"PlaylistEntry %li:(%@)", self.index, self.URL];
|
return [NSString stringWithFormat:@"PlaylistEntry %li:(%@)", self.index, self.URL];
|
||||||
|
@ -362,7 +367,7 @@
|
||||||
else
|
else
|
||||||
return @"Track Gain";
|
return @"Track Gain";
|
||||||
}
|
}
|
||||||
else if (volume)
|
else if (volume && volume != 1)
|
||||||
{
|
{
|
||||||
return @"Volume scale";
|
return @"Volume scale";
|
||||||
}
|
}
|
||||||
|
@ -372,6 +377,33 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@dynamic gainInfo;
|
||||||
|
- (NSString *)gainInfo
|
||||||
|
{
|
||||||
|
NSMutableArray * gainItems = [[NSMutableArray alloc] init];
|
||||||
|
if (replayGainAlbumGain)
|
||||||
|
{
|
||||||
|
[gainItems addObject:[NSString stringWithFormat:@"Album Gain: %+.2f dB", replayGainAlbumGain]];
|
||||||
|
}
|
||||||
|
if (replayGainAlbumPeak)
|
||||||
|
{
|
||||||
|
[gainItems addObject:[NSString stringWithFormat:@"Album Peak: %.6f", replayGainAlbumPeak]];
|
||||||
|
}
|
||||||
|
if (replayGainTrackGain)
|
||||||
|
{
|
||||||
|
[gainItems addObject:[NSString stringWithFormat:@"Track Gain: %+.2f dB", replayGainTrackGain]];
|
||||||
|
}
|
||||||
|
if (replayGainTrackPeak)
|
||||||
|
{
|
||||||
|
[gainItems addObject:[NSString stringWithFormat:@"Track Peak: %.6f", replayGainTrackPeak]];
|
||||||
|
}
|
||||||
|
if (volume && volume != 1)
|
||||||
|
{
|
||||||
|
[gainItems addObject:[NSString stringWithFormat:@"Volume Scale: %.2f%C", volume, (unichar)0x00D7]];
|
||||||
|
}
|
||||||
|
return [gainItems componentsJoinedByString:@"\n"];
|
||||||
|
}
|
||||||
|
|
||||||
@dynamic positionText;
|
@dynamic positionText;
|
||||||
- (NSString *)positionText
|
- (NSString *)positionText
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue