Permalink
Browse files

fixed metadata

  • Loading branch information...
1 parent 8eb00a0 commit b2fed1f1368c7b2c05be2d2b9d7c2239db156d2b @tomcool420 committed Nov 15, 2010
View
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.${PRODUCT_NAME:rfc1034Identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>NSPrincipalClass</key>
+ <string></string>
+</dict>
+</plist>
View
@@ -7,7 +7,7 @@ FRAMEWORK_NAME = SMFramework
SMFramework_FILES = SMFMediaMenuController.m SMFCenteredMenuController.m SMFFolderBrowser.m SMFMediaPreview.mm SMFBaseAsset.m SMFPasscodeController.m SMFMenuController.m
SMFramework_FILES += BRMenuItem_SMF.m SMFInvocationCenteredMenuController.m SMFMenuItem.m SMFScreenCapture.m SMFThemeInfo.m SMFClockController.m
SMFramework_FILES += SMFEventManager.m SMFEvent.m SMFEventConfiguration.m
-SMFramework_FILES += SMFPhotoMethods.mm SMFQueryMenu.m
+SMFramework_FILES += SMFPhotoMethods.mm SMFQueryMenu.m SMFProgressBarControl.m
SMFramework_INSTALL_PATH = /Library/Frameworks
#SMFramework_BUNDLE_EXTENSION = framework
SMFramework_LDFLAGS = -undefined dynamic_lookup -framework UIKit -framework ImageIO#-L$(FW_PROJECT_DIR) -lBackRow
View
@@ -132,15 +132,15 @@ - (void)setImagePath:(NSString *)path
- (void)setAsset:(id)a
{
- //NSLog(@"assetMeta: %@",asset);
+ NSLog(@"assetMeta: %@",a);
MetaDataType=kMetaTypeAsset;
[super setAsset:a];
- BRReflectionControl *c = MSHookIvar<BRReflectionControl *>(self, "_reflectionLayer");
- [c setImage:[a coverArt]];
- [c setReflectionAmount:0.337531];
-
- [[self coverArtLayer] setImage:[a coverArt]];
-
+// BRReflectionControl *c = MSHookIvar<BRReflectionControl *>(self, "_reflectionLayer");
+// [c setImage:[a coverArt]];
+// [c setReflectionAmount:0.337531];
+//
+// [[self coverArtLayer] setImage:[a coverArt]];
+//
//[_coverArtLayer setImage:[asset coverArt]];
//NSLog(@"_asset: %@",_asset);
@@ -184,27 +184,29 @@ - (id)_loadCoverArt
- (void)_populateMetadata
{
- //NSLog(@"_populate");
+ NSLog(@"_populate");
[super _populateMetadata];
[self doPopulation];
}
- (void)_updateMetadataLayer
{
- //NSLog(@"update");
+ NSLog(@"update");
[super _updateMetadataLayer];
[self doPopulation];
}
- (void)doPopulation
{
- //NSLog(@"doPopulation");
+ NSLog(@"doPopulation");
BRMetadataControl *metaLayer = [self gimmieMetadataLayer];
+ NSLog(@"meta Layer: %@",metaLayer);
switch (MetaDataType) {
case kMetaTypeAsset:
{
id a = [self asset];
+ NSLog(@"asset: %@",a);
if ([a respondsToSelector:@selector(orderedDictionary)]) {
NSDictionary *assetDict=[a orderedDictionary];
if([[assetDict allKeys] containsObject:METADATA_TITLE])
View
@@ -0,0 +1,38 @@
+//
+// SMProgressBarControl.h
+// QuDownloader
+//
+// Created by Alan Quatermain on 19/04/07.
+// Copyright 2007 AwkwardTV. All rights reserved.
+//
+// Updated by nito 08-20-08 - works in 2.x
+// Updated by Thomas 2-2-10 - allows for different aspect Ratios
+// Updated by Thomas 14-11-10 - ATV2 fixes
+
+@class BRProgressBarWidget;
+
+@interface SMFProgressBarControl : BRControl
+{
+ BRProgressBarWidget * _widget;
+ float _maxValue;
+ float _minValue;
+}
+
+- (id) init;
+- (void) dealloc;
+
+- (void) setFrame: (CGRect) frame;
+
+- (void) setMaxValue: (float) maxValue;
+- (float) maxValue;
+
+- (void) setMinValue: (float) minValue;
+- (float) minValue;
+
+- (void) setCurrentValue: (float) currentValue;
+- (float) currentValue;
+
+- (void) setPercentage: (float) percentage;
+- (float) percentage;
+
+@end
View
@@ -0,0 +1,116 @@
+//
+// SMFProgressBarControl.m
+// SoftwareMenuFramework
+//
+// Created by Alan Quatermain on 19/04/07.
+// Copyright 2007 AwkwardTV. All rights reserved.
+//
+// Updated by nito 08-20-08 - works in 2.x
+// Updated by Thomas 2-2-10 - allows for different aspect Ratios
+
+
+#import "SMFProgressBarControl.h"
+@implementation SMFProgressBarControl
+
+- (id) init
+{
+ self = [super init];
+
+ _widget = [[BRProgressBarWidget alloc] init];
+
+ [self addControl: _widget];
+
+ // defaults
+ _maxValue = 100.0f;
+ _minValue = 0.0f;
+
+ return self;
+}
+
+- (void) dealloc
+{
+ [_widget release];
+ //[_layer release];
+
+ [super dealloc];
+}
+
+- (void) setFrame: (CGRect) frame
+{
+ [super setFrame: frame];
+
+ CGRect widgetFrame;// = CGRectZero;
+ widgetFrame.origin.x = 0.0f;
+ widgetFrame.origin.y = 0.0f;
+ widgetFrame.size.width = frame.size.width;
+ widgetFrame.size.height = ceilf( frame.size.width * 0.1f );
+ if (frame.size.height>widgetFrame.size.height) {
+ widgetFrame.origin.y=widgetFrame.origin.y+ceilf((frame.size.height-widgetFrame.size.height)/2.f);
+ }
+ [_widget setFrame: widgetFrame];
+}
+
+
+
+- (void) setMaxValue: (float) maxValue
+{
+ @synchronized(self)
+ {
+ _maxValue = maxValue;
+ }
+}
+
+- (float) maxValue
+{
+ return ( _maxValue );
+}
+
+- (void) setMinValue: (float) minValue
+{
+ @synchronized(self)
+ {
+ _minValue = minValue;
+ }
+}
+
+- (float) minValue
+{
+ return ( _minValue );
+}
+
+- (void) setCurrentValue: (float) currentValue
+{
+ @synchronized(self)
+ {
+ float range = _maxValue - _minValue;
+ float value = currentValue - _minValue;
+ float percentage = (value / range) * 100.0f;
+ [_widget setPercentage: percentage];
+ }
+}
+
+- (float) currentValue
+{
+ float result = 0.0f;
+
+ @synchronized(self)
+ {
+ float percentage = [_widget percentage];
+ float range = _maxValue - _minValue;
+ result = (percentage / 100.0f) * range;
+ }
+
+ return ( result );
+}
+
+- (void) setPercentage: (float) percentage
+{
+ [_widget setPercentage: percentage];
+}
+
+- (float) percentage
+{
+ return ( [_widget percentage] );
+}
+
+@end
@@ -97,6 +97,8 @@
DDCB54C9128CA1EC0045529A /* NSTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSTask.h; sourceTree = "<group>"; };
DDCB54CA128CA2010045529A /* SMFTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMFTask.h; sourceTree = "<group>"; };
DDCB54CB128CA2010045529A /* SMFTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SMFTask.m; sourceTree = "<group>"; };
+ DDD623101290953500FC2CE5 /* SMFProgressBarControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMFProgressBarControl.h; sourceTree = "<group>"; };
+ DDD623111290953500FC2CE5 /* SMFProgressBarControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SMFProgressBarControl.m; sourceTree = "<group>"; };
DDDC7DAD12731D1F00192ADD /* SMFMediaMenuController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMFMediaMenuController.h; sourceTree = "<group>"; };
DDDC7DAE12731D1F00192ADD /* SMFMediaMenuController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SMFMediaMenuController.m; sourceTree = "<group>"; };
DDDC80E9127375CE00192ADD /* SMFCenteredMenuController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMFCenteredMenuController.h; sourceTree = "<group>"; };
@@ -191,6 +193,8 @@
DD3136CC1277CFFC00042510 /* SMFMenuItem.m */,
DDABC41A127877B3001F026B /* SMFScreenCapture.h */,
DDABC41B127877B3001F026B /* SMFScreenCapture.m */,
+ DDD623101290953500FC2CE5 /* SMFProgressBarControl.h */,
+ DDD623111290953500FC2CE5 /* SMFProgressBarControl.m */,
DD0F805B127CEF6700277D06 /* SMFFolderDelegate.h */,
DD0F805C127CEF6700277D06 /* SMFFolderDelegate.m */,
DD0F80B8127CF99A00277D06 /* SMFThemeInfo.h */,
Oops, something went wrong.

0 comments on commit b2fed1f

Please sign in to comment.