Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 54 lines (51 sloc) 1.493 kB
9997a71 @tomcool420 adding SMFCommonTools (including popups)
authored
1 //
2 // SMFPopup.xm
3 // SMFramework
4 //
5 // Created by Thomas Cool on 11/20/10.
6 // Copyright 2010 tomcool.org. All rights reserved.
7 //
2575a7f @tomcool420 lots o' updates
authored
8 //%hook BRTrackInfoControl
9 //-(void)_updateCoverArt:(id)art
10 //{
11 // NSLog(@"art: %@",art);
12 // return %orig;
13 //
14 //}
15 //%end
9997a71 @tomcool420 adding SMFCommonTools (including popups)
authored
16
631d32a @tomcool420 some fixes
authored
17 #import "SMFPopup.h"
9997a71 @tomcool420 adding SMFCommonTools (including popups)
authored
18 %subclass SMFPopupInfo : BRTrackInfoControl
19 - (id)_fetchCoverArt
20 {
21 return [[BRThemeInfo sharedTheme] appleTVIcon];
22 }
23 - (void)_updateTrackInfo
24 {
25 id l = MSHookIvar<BRTrackInfoLayer *>(self, "_layer");
2575a7f @tomcool420 lots o' updates
authored
26 //BRImageControl *_layerArt = MSHookIvar<BRImageControl *>(l,"_art");
9997a71 @tomcool420 adding SMFCommonTools (including popups)
authored
27 id obj=[self object];
2c5c45a @tomcool420 some more cleanup
authored
28 if(obj!=nil && [obj isKindOfClass:[NSDictionary class]])
9997a71 @tomcool420 adding SMFCommonTools (including popups)
authored
29 {
2575a7f @tomcool420 lots o' updates
authored
30 //NSLog(@"obj: %@",obj);
2c5c45a @tomcool420 some more cleanup
authored
31 if([obj objectForKey:@"Image"])
32 {
2575a7f @tomcool420 lots o' updates
authored
33 //[self _updateCoverArt:[obj objectForKey:@"Image"]];
2c5c45a @tomcool420 some more cleanup
authored
34 if([obj objectForKey:@"Lines"])
35 [l setLines:[obj objectForKey:@"Lines"] withImage:[obj objectForKey:@"Image"]];
36 else
37 [l setImage:[obj objectForKey:@"Image"]];
2575a7f @tomcool420 lots o' updates
authored
38 //[_layerArt setImage:[obj objectForKey:@"Image"]];
2c5c45a @tomcool420 some more cleanup
authored
39 }
40 else
2575a7f @tomcool420 lots o' updates
authored
41 {
42 //[self _updateCoverArt:[self _fetchCoverArt]];
2c5c45a @tomcool420 some more cleanup
authored
43 [l setLines:[NSArray arrayWithObjects:@"error",nil] withImage:[self _fetchCoverArt]];
2575a7f @tomcool420 lots o' updates
authored
44 }
45
2c5c45a @tomcool420 some more cleanup
authored
46
9997a71 @tomcool420 adding SMFCommonTools (including popups)
authored
47 }
48 else
2c5c45a @tomcool420 some more cleanup
authored
49 [l setLines:[NSArray arrayWithObjects:@"error",nil] withImage:[self _fetchCoverArt]];
2575a7f @tomcool420 lots o' updates
authored
50 // [l _updateSublayers];
51 // [l layoutSubcontrols];
9997a71 @tomcool420 adding SMFCommonTools (including popups)
authored
52 //%orig;
53 }
54 %end
Something went wrong with that request. Please try again.