Changeset 478
- Timestamp:
- 02/02/08 11:12:43 (1 year ago)
- Files:
-
- trunk/Software Loader/SLoadApplianceController.h (modified) (1 diff)
- trunk/Software Loader/SLoadApplianceController.m (modified) (6 diffs)
- trunk/Software Loader/SLoadChannelParser.h (modified) (1 diff)
- trunk/Software Loader/SLoadChannelParser.m (modified) (1 diff)
- trunk/Software Loader/SLoadFrappInstaller.m (modified) (1 diff)
- trunk/Software Loader/Software Loader.xcodeproj/project.pbxproj (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Software Loader/SLoadApplianceController.h
r463 r478 21 21 #import <SapphireCompatClasses/SapphireMediaMenuController.h> 22 22 23 @class SLoadInstallServer ;23 @class SLoadInstallServer, SLoadChannelParser; 24 24 25 25 @interface SLoadApplianceController : SapphireMediaMenuController 26 26 { 27 NSArray * names;27 NSArray *software; 28 28 NSString *error; 29 29 NSFileManager *filemanager; 30 30 SLoadInstallServer *installServer; 31 SLoadChannelParser *parser; 31 32 } 32 33 @end trunk/Software Loader/SLoadApplianceController.m
r463 r478 24 24 #import "SLoadInstallClient.h" 25 25 #import "SLoadInstallProgress.h" 26 #import <SLoadUtilities/SLoadChannelParser.h> 27 #import <SLoadUtilities/SLoadInstallerProtocol.h> 26 28 27 29 @implementation SLoadApplianceController … … 35 37 installServer = [[SLoadInstallServer alloc] init]; 36 38 37 names = [[NSArray alloc] initWithObjects:@"Install Perian", nil]; 39 parser = [[SLoadInstaller alloc] init]; 40 software = [[parser softwareList] retain]; 41 38 42 [[self list] setDatasource:self]; 39 43 … … 43 47 - (void) dealloc 44 48 { 45 [ namesrelease];49 [software release]; 46 50 [installServer release]; 51 [parser release]; 47 52 [super dealloc]; 48 53 } … … 50 55 - (long) itemCount 51 56 { 52 return [ namescount];57 return [software count]; 53 58 } 54 59 … … 56 61 { 57 62 BRAdornedMenuItemLayer *ret = [BRAdornedMenuItemLayer adornedMenuItemWithScene:[self scene]]; 58 [[ret textItem] setTitle:[ names objectAtIndex:row]];63 [[ret textItem] setTitle:[[software objectAtIndex:row] objectForKey:INSTALL_DISPLAY_NAME_KEY]]; 59 64 } 60 65 … … 62 67 { 63 68 64 if ( row > [ namescount] ) return ( nil );69 if ( row > [ software count] ) return ( nil ); 65 70 66 NSString *result = [ names objectAtIndex: row];71 NSString *result = [[software objectAtIndex:row] objectForKey:INSTALL_DISPLAY_NAME_KEY]; 67 72 return ( result ) ; 68 73 } trunk/Software Loader/SLoadChannelParser.h
r463 r478 24 24 NSMutableDictionary *installers; 25 25 } 26 - (void)reloadList; 26 27 - (NSArray *)softwareList; 27 28 - (NSDictionary *)installers; trunk/Software Loader/SLoadChannelParser.m
r463 r478 132 132 if(xmlDoc == nil) 133 133 [self loadXML]; 134 if( softwareList == nil || installers == nil)134 if([softwareList count] == 0 || [installers count] == 0) 135 135 [self parseXML]; 136 } 137 138 - (void)reloadList 139 { 140 [xmlDoc release]; 141 xmlDoc = nil; 142 [softwareList removeAllObjects]; 143 [installers removeAllObjects]; 144 [self loadAndParseXML]; 136 145 } 137 146 trunk/Software Loader/SLoadFrappInstaller.m
r463 r478 87 87 if(success) 88 88 success = [fileUtils move:[tmpPath stringByAppendingPathComponent:[installDict objectForKey:INSTALL_NAME_KEY]] toDir:installPath withReplacement:YES]; 89 [fileUtils remountReadOnly]; 89 90 FrapStageSet(FRAP_INSTALL_STAGE_STAGES); 90 [fileUtils remountReadOnly];91 91 } 92 92 trunk/Software Loader/Software Loader.xcodeproj/project.pbxproj
r463 r478 224 224 F5F314C50D1D952800B3EF25 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; 225 225 F5F314C80D1D953900B3EF25 /* BackRow.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BackRow.framework; path = /System/Library/PrivateFrameworks/BackRow.framework; sourceTree = "<absolute>"; }; 226 F5F314E20D1D977200B3EF25 /* BackRowUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackRowUtils.h; sourceTree = "<group>"; };227 226 F5F314E40D1D979300B3EF25 /* SLoadApplianceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SLoadApplianceController.h; sourceTree = "<group>"; }; 228 227 F5F314E50D1D979300B3EF25 /* SLoadApplianceController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SLoadApplianceController.m; sourceTree = "<group>"; }; … … 434 433 isa = PBXGroup; 435 434 children = ( 436 F5F314E20D1D977200B3EF25 /* BackRowUtils.h */,437 435 F5F314C20D1D950000B3EF25 /* SLoader_Prefix.pch */, 438 436 ); … … 964 962 COPY_PHASE_STRIP = NO; 965 963 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 964 GCC_PREPROCESSOR_DEFINITIONS = DEBUG_BUILD; 966 965 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; 967 966 SYMROOT = ../build;
